Debian Codegraph @

semconv/v1.25.0/trace.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 // Code generated from semantic convention specification. DO NOT EDIT.
5
6 package semconv // import "go.opentelemetry.io/otel/semconv/v1.25.0"
7
8 import "go.opentelemetry.io/otel/attribute"
9
10 // Operations that access some remote service.
11 const (
12 // PeerServiceKey is the attribute Key conforming to the "peer.service"
13 // semantic conventions. It represents the
14 // [`service.name`](/docs/resource/README.md#service) of the remote
15 // service. SHOULD be equal to the actual `service.name` resource attribute
16 // of the remote service if any.
17 //
18 // Type: string
19 // RequirementLevel: Optional
20 // Stability: experimental
21 // Examples: 'AuthTokenCache'
22 PeerServiceKey = attribute.Key("peer.service")
23 )
24
25 // PeerService returns an attribute KeyValue conforming to the
26 // "peer.service" semantic conventions. It represents the
27 // [`service.name`](/docs/resource/README.md#service) of the remote service.
28 // SHOULD be equal to the actual `service.name` resource attribute of the
29 // remote service if any.
30 func PeerService(val string) attribute.KeyValue {
31 return PeerServiceKey.String(val)
32 }
33
34 // Span attributes used by AWS Lambda (in addition to general `faas`
35 // attributes).
36 const (
37 // AWSLambdaInvokedARNKey is the attribute Key conforming to the
38 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
39 // invoked ARN as provided on the `Context` passed to the function
40 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
41 // `/runtime/invocation/next` applicable).
42 //
43 // Type: string
44 // RequirementLevel: Optional
45 // Stability: experimental
46 // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias'
47 // Note: This may be different from `cloud.resource_id` if an alias is
48 // involved.
49 AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn")
50 )
51
52 // AWSLambdaInvokedARN returns an attribute KeyValue conforming to the
53 // "aws.lambda.invoked_arn" semantic conventions. It represents the full
54 // invoked ARN as provided on the `Context` passed to the function
55 // (`Lambda-Runtime-Invoked-Function-ARN` header on the
56 // `/runtime/invocation/next` applicable).
57 func AWSLambdaInvokedARN(val string) attribute.KeyValue {
58 return AWSLambdaInvokedARNKey.String(val)
59 }
60
61 // Semantic conventions for the OpenTracing Shim
62 const (
63 // OpentracingRefTypeKey is the attribute Key conforming to the
64 // "opentracing.ref_type" semantic conventions. It represents the
65 // parent-child Reference type
66 //
67 // Type: Enum
68 // RequirementLevel: Optional
69 // Stability: experimental
70 // Note: The causal relationship between a child Span and a parent Span.
71 OpentracingRefTypeKey = attribute.Key("opentracing.ref_type")
72 )
73
74 var (
75 // The parent Span depends on the child Span in some capacity
76 OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of")
77 // The parent Span doesn't depend in any way on the result of the child Span
78 OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from")
79 )
80
81 // Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's
82 // concepts.
83 const (
84 // OTelStatusCodeKey is the attribute Key conforming to the
85 // "otel.status_code" semantic conventions. It represents the name of the
86 // code, either "OK" or "ERROR". MUST NOT be set if the status code is
87 // UNSET.
88 //
89 // Type: Enum
90 // RequirementLevel: Optional
91 // Stability: stable
92 OTelStatusCodeKey = attribute.Key("otel.status_code")
93
94 // OTelStatusDescriptionKey is the attribute Key conforming to the
95 // "otel.status_description" semantic conventions. It represents the
96 // description of the Status if it has a value, otherwise not set.
97 //
98 // Type: string
99 // RequirementLevel: Optional
100 // Stability: stable
101 // Examples: 'resource not found'
102 OTelStatusDescriptionKey = attribute.Key("otel.status_description")
103 )
104
105 var (
106 // The operation has been validated by an Application developer or Operator to have completed successfully
107 OTelStatusCodeOk = OTelStatusCodeKey.String("OK")
108 // The operation contains an error
109 OTelStatusCodeError = OTelStatusCodeKey.String("ERROR")
110 )
111
112 // OTelStatusDescription returns an attribute KeyValue conforming to the
113 // "otel.status_description" semantic conventions. It represents the
114 // description of the Status if it has a value, otherwise not set.
115 func OTelStatusDescription(val string) attribute.KeyValue {
116 return OTelStatusDescriptionKey.String(val)
117 }
118
119 // The `aws` conventions apply to operations using the AWS SDK. They map
120 // request or response parameters in AWS SDK API calls to attributes on a Span.
121 // The conventions have been collected over time based on feedback from AWS
122 // users of tracing and will continue to evolve as new interesting conventions
123 // are found.
124 // Some descriptions are also provided for populating general OpenTelemetry
125 // semantic conventions based on these APIs.
126 const (
127 // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id"
128 // semantic conventions. It represents the AWS request ID as returned in
129 // the response headers `x-amz-request-id` or `x-amz-requestid`.
130 //
131 // Type: string
132 // RequirementLevel: Optional
133 // Stability: experimental
134 // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ'
135 AWSRequestIDKey = attribute.Key("aws.request_id")
136 )
137
138 // AWSRequestID returns an attribute KeyValue conforming to the
139 // "aws.request_id" semantic conventions. It represents the AWS request ID as
140 // returned in the response headers `x-amz-request-id` or `x-amz-requestid`.
141 func AWSRequestID(val string) attribute.KeyValue {
142 return AWSRequestIDKey.String(val)
143 }
144
145 // Attributes that exist for S3 request types.
146 const (
147 // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket"
148 // semantic conventions. It represents the S3 bucket name the request
149 // refers to. Corresponds to the `--bucket` parameter of the [S3
150 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
151 // operations.
152 //
153 // Type: string
154 // RequirementLevel: Optional
155 // Stability: experimental
156 // Examples: 'some-bucket-name'
157 // Note: The `bucket` attribute is applicable to all S3 operations that
158 // reference a bucket, i.e. that require the bucket name as a mandatory
159 // parameter.
160 // This applies to almost all S3 operations except `list-buckets`.
161 AWSS3BucketKey = attribute.Key("aws.s3.bucket")
162
163 // AWSS3CopySourceKey is the attribute Key conforming to the
164 // "aws.s3.copy_source" semantic conventions. It represents the source
165 // object (in the form `bucket`/`key`) for the copy operation.
166 //
167 // Type: string
168 // RequirementLevel: Optional
169 // Stability: experimental
170 // Examples: 'someFile.yml'
171 // Note: The `copy_source` attribute applies to S3 copy operations and
172 // corresponds to the `--copy-source` parameter
173 // of the [copy-object operation within the S3
174 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html).
175 // This applies in particular to the following operations:
176 //
177 // -
178 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
179 // -
180 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
181 AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source")
182
183 // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete"
184 // semantic conventions. It represents the delete request container that
185 // specifies the objects to be deleted.
186 //
187 // Type: string
188 // RequirementLevel: Optional
189 // Stability: experimental
190 // Examples:
191 // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean'
192 // Note: The `delete` attribute is only applicable to the
193 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
194 // operation.
195 // The `delete` attribute corresponds to the `--delete` parameter of the
196 // [delete-objects operation within the S3
197 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html).
198 AWSS3DeleteKey = attribute.Key("aws.s3.delete")
199
200 // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic
201 // conventions. It represents the S3 object key the request refers to.
202 // Corresponds to the `--key` parameter of the [S3
203 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
204 // operations.
205 //
206 // Type: string
207 // RequirementLevel: Optional
208 // Stability: experimental
209 // Examples: 'someFile.yml'
210 // Note: The `key` attribute is applicable to all object-related S3
211 // operations, i.e. that require the object key as a mandatory parameter.
212 // This applies in particular to the following operations:
213 //
214 // -
215 // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html)
216 // -
217 // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html)
218 // -
219 // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html)
220 // -
221 // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html)
222 // -
223 // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html)
224 // -
225 // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html)
226 // -
227 // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html)
228 // -
229 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
230 // -
231 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
232 // -
233 // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html)
234 // -
235 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
236 // -
237 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
238 // -
239 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
240 AWSS3KeyKey = attribute.Key("aws.s3.key")
241
242 // AWSS3PartNumberKey is the attribute Key conforming to the
243 // "aws.s3.part_number" semantic conventions. It represents the part number
244 // of the part being uploaded in a multipart-upload operation. This is a
245 // positive integer between 1 and 10,000.
246 //
247 // Type: int
248 // RequirementLevel: Optional
249 // Stability: experimental
250 // Examples: 3456
251 // Note: The `part_number` attribute is only applicable to the
252 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
253 // and
254 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
255 // operations.
256 // The `part_number` attribute corresponds to the `--part-number` parameter
257 // of the
258 // [upload-part operation within the S3
259 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html).
260 AWSS3PartNumberKey = attribute.Key("aws.s3.part_number")
261
262 // AWSS3UploadIDKey is the attribute Key conforming to the
263 // "aws.s3.upload_id" semantic conventions. It represents the upload ID
264 // that identifies the multipart upload.
265 //
266 // Type: string
267 // RequirementLevel: Optional
268 // Stability: experimental
269 // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ'
270 // Note: The `upload_id` attribute applies to S3 multipart-upload
271 // operations and corresponds to the `--upload-id` parameter
272 // of the [S3
273 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
274 // multipart operations.
275 // This applies in particular to the following operations:
276 //
277 // -
278 // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html)
279 // -
280 // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html)
281 // -
282 // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html)
283 // -
284 // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html)
285 // -
286 // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html)
287 AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id")
288 )
289
290 // AWSS3Bucket returns an attribute KeyValue conforming to the
291 // "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the
292 // request refers to. Corresponds to the `--bucket` parameter of the [S3
293 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
294 // operations.
295 func AWSS3Bucket(val string) attribute.KeyValue {
296 return AWSS3BucketKey.String(val)
297 }
298
299 // AWSS3CopySource returns an attribute KeyValue conforming to the
300 // "aws.s3.copy_source" semantic conventions. It represents the source object
301 // (in the form `bucket`/`key`) for the copy operation.
302 func AWSS3CopySource(val string) attribute.KeyValue {
303 return AWSS3CopySourceKey.String(val)
304 }
305
306 // AWSS3Delete returns an attribute KeyValue conforming to the
307 // "aws.s3.delete" semantic conventions. It represents the delete request
308 // container that specifies the objects to be deleted.
309 func AWSS3Delete(val string) attribute.KeyValue {
310 return AWSS3DeleteKey.String(val)
311 }
312
313 // AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key"
314 // semantic conventions. It represents the S3 object key the request refers to.
315 // Corresponds to the `--key` parameter of the [S3
316 // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html)
317 // operations.
318 func AWSS3Key(val string) attribute.KeyValue {
319 return AWSS3KeyKey.String(val)
320 }
321
322 // AWSS3PartNumber returns an attribute KeyValue conforming to the
323 // "aws.s3.part_number" semantic conventions. It represents the part number of
324 // the part being uploaded in a multipart-upload operation. This is a positive
325 // integer between 1 and 10,000.
326 func AWSS3PartNumber(val int) attribute.KeyValue {
327 return AWSS3PartNumberKey.Int(val)
328 }
329
330 // AWSS3UploadID returns an attribute KeyValue conforming to the
331 // "aws.s3.upload_id" semantic conventions. It represents the upload ID that
332 // identifies the multipart upload.
333 func AWSS3UploadID(val string) attribute.KeyValue {
334 return AWSS3UploadIDKey.String(val)
335 }
336
337 // Semantic conventions to apply when instrumenting the GraphQL implementation.
338 // They map GraphQL operations to attributes on a Span.
339 const (
340 // GraphqlDocumentKey is the attribute Key conforming to the
341 // "graphql.document" semantic conventions. It represents the GraphQL
342 // document being executed.
343 //
344 // Type: string
345 // RequirementLevel: Optional
346 // Stability: experimental
347 // Examples: 'query findBookByID { bookByID(id: ?) { name } }'
348 // Note: The value may be sanitized to exclude sensitive information.
349 GraphqlDocumentKey = attribute.Key("graphql.document")
350
351 // GraphqlOperationNameKey is the attribute Key conforming to the
352 // "graphql.operation.name" semantic conventions. It represents the name of
353 // the operation being executed.
354 //
355 // Type: string
356 // RequirementLevel: Optional
357 // Stability: experimental
358 // Examples: 'findBookByID'
359 GraphqlOperationNameKey = attribute.Key("graphql.operation.name")
360
361 // GraphqlOperationTypeKey is the attribute Key conforming to the
362 // "graphql.operation.type" semantic conventions. It represents the type of
363 // the operation being executed.
364 //
365 // Type: Enum
366 // RequirementLevel: Optional
367 // Stability: experimental
368 // Examples: 'query', 'mutation', 'subscription'
369 GraphqlOperationTypeKey = attribute.Key("graphql.operation.type")
370 )
371
372 var (
373 // GraphQL query
374 GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query")
375 // GraphQL mutation
376 GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation")
377 // GraphQL subscription
378 GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription")
379 )
380
381 // GraphqlDocument returns an attribute KeyValue conforming to the
382 // "graphql.document" semantic conventions. It represents the GraphQL document
383 // being executed.
384 func GraphqlDocument(val string) attribute.KeyValue {
385 return GraphqlDocumentKey.String(val)
386 }
387
388 // GraphqlOperationName returns an attribute KeyValue conforming to the
389 // "graphql.operation.name" semantic conventions. It represents the name of the
390 // operation being executed.
391 func GraphqlOperationName(val string) attribute.KeyValue {
392 return GraphqlOperationNameKey.String(val)
393 }