| 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.27.0" |
| 7 |
|
| 8 |
import "go.opentelemetry.io/otel/attribute" |
| 9 |
|
| 10 |
// The Android platform on which the Android application is running. |
| 11 |
const ( |
| 12 |
// AndroidOSAPILevelKey is the attribute Key conforming to the |
| 13 |
// "android.os.api_level" semantic conventions. It represents the uniquely |
| 14 |
// identifies the framework API revision offered by a version |
| 15 |
// (`os.version`) of the android operating system. More information can be |
| 16 |
// found |
| 17 |
// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). |
| 18 |
// |
| 19 |
// Type: string |
| 20 |
// RequirementLevel: Optional |
| 21 |
// Stability: experimental |
| 22 |
// Examples: '33', '32' |
| 23 |
AndroidOSAPILevelKey = attribute.Key("android.os.api_level") |
| 24 |
) |
| 25 |
|
| 26 |
// AndroidOSAPILevel returns an attribute KeyValue conforming to the |
| 27 |
// "android.os.api_level" semantic conventions. It represents the uniquely |
| 28 |
// identifies the framework API revision offered by a version (`os.version`) of |
| 29 |
// the android operating system. More information can be found |
| 30 |
// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). |
| 31 |
func AndroidOSAPILevel(val string) attribute.KeyValue { |
| 32 |
return AndroidOSAPILevelKey.String(val) |
| 33 |
} |
| 34 |
|
| 35 |
// This group describes attributes specific to artifacts. Artifacts are files |
| 36 |
// or other immutable objects that are intended for distribution. This |
| 37 |
// definition aligns directly with the |
| 38 |
// [SLSA](https://slsa.dev/spec/v1.0/terminology#package-model) package model. |
| 39 |
const ( |
| 40 |
// ArtifactAttestationFilenameKey is the attribute Key conforming to the |
| 41 |
// "artifact.attestation.filename" semantic conventions. It represents the |
| 42 |
// provenance filename of the built attestation which directly relates to |
| 43 |
// the build artifact filename. This filename SHOULD accompany the artifact |
| 44 |
// at publish time. See the [SLSA |
| 45 |
// Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) |
| 46 |
// specification for more information. |
| 47 |
// |
| 48 |
// Type: string |
| 49 |
// RequirementLevel: Optional |
| 50 |
// Stability: experimental |
| 51 |
// Examples: 'golang-binary-amd64-v0.1.0.attestation', |
| 52 |
// 'docker-image-amd64-v0.1.0.intoto.json1', |
| 53 |
// 'release-1.tar.gz.attestation', 'file-name-package.tar.gz.intoto.json1' |
| 54 |
ArtifactAttestationFilenameKey = attribute.Key("artifact.attestation.filename") |
| 55 |
|
| 56 |
// ArtifactAttestationHashKey is the attribute Key conforming to the |
| 57 |
// "artifact.attestation.hash" semantic conventions. It represents the full |
| 58 |
// [hash value (see |
| 59 |
// glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), |
| 60 |
// of the built attestation. Some envelopes in the software attestation |
| 61 |
// space also refer to this as the |
| 62 |
// [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). |
| 63 |
// |
| 64 |
// Type: string |
| 65 |
// RequirementLevel: Optional |
| 66 |
// Stability: experimental |
| 67 |
// Examples: |
| 68 |
// '1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408' |
| 69 |
ArtifactAttestationHashKey = attribute.Key("artifact.attestation.hash") |
| 70 |
|
| 71 |
// ArtifactAttestationIDKey is the attribute Key conforming to the |
| 72 |
// "artifact.attestation.id" semantic conventions. It represents the id of |
| 73 |
// the build [software attestation](https://slsa.dev/attestation-model). |
| 74 |
// |
| 75 |
// Type: string |
| 76 |
// RequirementLevel: Optional |
| 77 |
// Stability: experimental |
| 78 |
// Examples: '123' |
| 79 |
ArtifactAttestationIDKey = attribute.Key("artifact.attestation.id") |
| 80 |
|
| 81 |
// ArtifactFilenameKey is the attribute Key conforming to the |
| 82 |
// "artifact.filename" semantic conventions. It represents the human |
| 83 |
// readable file name of the artifact, typically generated during build and |
| 84 |
// release processes. Often includes the package name and version in the |
| 85 |
// file name. |
| 86 |
// |
| 87 |
// Type: string |
| 88 |
// RequirementLevel: Optional |
| 89 |
// Stability: experimental |
| 90 |
// Examples: 'golang-binary-amd64-v0.1.0', 'docker-image-amd64-v0.1.0', |
| 91 |
// 'release-1.tar.gz', 'file-name-package.tar.gz' |
| 92 |
// Note: This file name can also act as the [Package |
| 93 |
// Name](https://slsa.dev/spec/v1.0/terminology#package-model) |
| 94 |
// in cases where the package ecosystem maps accordingly. |
| 95 |
// Additionally, the artifact [can be |
| 96 |
// published](https://slsa.dev/spec/v1.0/terminology#software-supply-chain) |
| 97 |
// for others, but that is not a guarantee. |
| 98 |
ArtifactFilenameKey = attribute.Key("artifact.filename") |
| 99 |
|
| 100 |
// ArtifactHashKey is the attribute Key conforming to the "artifact.hash" |
| 101 |
// semantic conventions. It represents the full [hash value (see |
| 102 |
// glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), |
| 103 |
// often found in checksum.txt on a release of the artifact and used to |
| 104 |
// verify package integrity. |
| 105 |
// |
| 106 |
// Type: string |
| 107 |
// RequirementLevel: Optional |
| 108 |
// Stability: experimental |
| 109 |
// Examples: |
| 110 |
// '9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9' |
| 111 |
// Note: The specific algorithm used to create the cryptographic hash value |
| 112 |
// is |
| 113 |
// not defined. In situations where an artifact has multiple |
| 114 |
// cryptographic hashes, it is up to the implementer to choose which |
| 115 |
// hash value to set here; this should be the most secure hash algorithm |
| 116 |
// that is suitable for the situation and consistent with the |
| 117 |
// corresponding attestation. The implementer can then provide the other |
| 118 |
// hash values through an additional set of attribute extensions as they |
| 119 |
// deem necessary. |
| 120 |
ArtifactHashKey = attribute.Key("artifact.hash") |
| 121 |
|
| 122 |
// ArtifactPurlKey is the attribute Key conforming to the "artifact.purl" |
| 123 |
// semantic conventions. It represents the [Package |
| 124 |
// URL](https://github.com/package-url/purl-spec) of the [package |
| 125 |
// artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides |
| 126 |
// a standard way to identify and locate the packaged artifact. |
| 127 |
// |
| 128 |
// Type: string |
| 129 |
// RequirementLevel: Optional |
| 130 |
// Stability: experimental |
| 131 |
// Examples: 'pkg:github/package-url/purl-spec@1209109710924', |
| 132 |
// 'pkg:npm/[email protected]' |
| 133 |
ArtifactPurlKey = attribute.Key("artifact.purl") |
| 134 |
|
| 135 |
// ArtifactVersionKey is the attribute Key conforming to the |
| 136 |
// "artifact.version" semantic conventions. It represents the version of |
| 137 |
// the artifact. |
| 138 |
// |
| 139 |
// Type: string |
| 140 |
// RequirementLevel: Optional |
| 141 |
// Stability: experimental |
| 142 |
// Examples: 'v0.1.0', '1.2.1', '122691-build' |
| 143 |
ArtifactVersionKey = attribute.Key("artifact.version") |
| 144 |
) |
| 145 |
|
| 146 |
// ArtifactAttestationFilename returns an attribute KeyValue conforming to |
| 147 |
// the "artifact.attestation.filename" semantic conventions. It represents the |
| 148 |
// provenance filename of the built attestation which directly relates to the |
| 149 |
// build artifact filename. This filename SHOULD accompany the artifact at |
| 150 |
// publish time. See the [SLSA |
| 151 |
// Relationship](https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations) |
| 152 |
// specification for more information. |
| 153 |
func ArtifactAttestationFilename(val string) attribute.KeyValue { |
| 154 |
return ArtifactAttestationFilenameKey.String(val) |
| 155 |
} |
| 156 |
|
| 157 |
// ArtifactAttestationHash returns an attribute KeyValue conforming to the |
| 158 |
// "artifact.attestation.hash" semantic conventions. It represents the full |
| 159 |
// [hash value (see |
| 160 |
// glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), of |
| 161 |
// the built attestation. Some envelopes in the software attestation space also |
| 162 |
// refer to this as the |
| 163 |
// [digest](https://github.com/in-toto/attestation/blob/main/spec/README.md#in-toto-attestation-framework-spec). |
| 164 |
func ArtifactAttestationHash(val string) attribute.KeyValue { |
| 165 |
return ArtifactAttestationHashKey.String(val) |
| 166 |
} |
| 167 |
|
| 168 |
// ArtifactAttestationID returns an attribute KeyValue conforming to the |
| 169 |
// "artifact.attestation.id" semantic conventions. It represents the id of the |
| 170 |
// build [software attestation](https://slsa.dev/attestation-model). |
| 171 |
func ArtifactAttestationID(val string) attribute.KeyValue { |
| 172 |
return ArtifactAttestationIDKey.String(val) |
| 173 |
} |
| 174 |
|
| 175 |
// ArtifactFilename returns an attribute KeyValue conforming to the |
| 176 |
// "artifact.filename" semantic conventions. It represents the human readable |
| 177 |
// file name of the artifact, typically generated during build and release |
| 178 |
// processes. Often includes the package name and version in the file name. |
| 179 |
func ArtifactFilename(val string) attribute.KeyValue { |
| 180 |
return ArtifactFilenameKey.String(val) |
| 181 |
} |
| 182 |
|
| 183 |
// ArtifactHash returns an attribute KeyValue conforming to the |
| 184 |
// "artifact.hash" semantic conventions. It represents the full [hash value |
| 185 |
// (see glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), |
| 186 |
// often found in checksum.txt on a release of the artifact and used to verify |
| 187 |
// package integrity. |
| 188 |
func ArtifactHash(val string) attribute.KeyValue { |
| 189 |
return ArtifactHashKey.String(val) |
| 190 |
} |
| 191 |
|
| 192 |
// ArtifactPurl returns an attribute KeyValue conforming to the |
| 193 |
// "artifact.purl" semantic conventions. It represents the [Package |
| 194 |
// URL](https://github.com/package-url/purl-spec) of the [package |
| 195 |
// artifact](https://slsa.dev/spec/v1.0/terminology#package-model) provides a |
| 196 |
// standard way to identify and locate the packaged artifact. |
| 197 |
func ArtifactPurl(val string) attribute.KeyValue { |
| 198 |
return ArtifactPurlKey.String(val) |
| 199 |
} |
| 200 |
|
| 201 |
// ArtifactVersion returns an attribute KeyValue conforming to the |
| 202 |
// "artifact.version" semantic conventions. It represents the version of the |
| 203 |
// artifact. |
| 204 |
func ArtifactVersion(val string) attribute.KeyValue { |
| 205 |
return ArtifactVersionKey.String(val) |
| 206 |
} |
| 207 |
|
| 208 |
// ASP.NET Core attributes |
| 209 |
const ( |
| 210 |
// ASPNETCoreRateLimitingResultKey is the attribute Key conforming to the |
| 211 |
// "aspnetcore.rate_limiting.result" semantic conventions. It represents |
| 212 |
// the rate-limiting result, shows whether the lease was acquired or |
| 213 |
// contains a rejection reason |
| 214 |
// |
| 215 |
// Type: Enum |
| 216 |
// RequirementLevel: Required |
| 217 |
// Stability: stable |
| 218 |
// Examples: 'acquired', 'request_canceled' |
| 219 |
ASPNETCoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result") |
| 220 |
|
| 221 |
// ASPNETCoreDiagnosticsHandlerTypeKey is the attribute Key conforming to |
| 222 |
// the "aspnetcore.diagnostics.handler.type" semantic conventions. It |
| 223 |
// represents the full type name of the |
| 224 |
// [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) |
| 225 |
// implementation that handled the exception. |
| 226 |
// |
| 227 |
// Type: string |
| 228 |
// RequirementLevel: ConditionallyRequired (if and only if the exception |
| 229 |
// was handled by this handler.) |
| 230 |
// Stability: stable |
| 231 |
// Examples: 'Contoso.MyHandler' |
| 232 |
ASPNETCoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type") |
| 233 |
|
| 234 |
// ASPNETCoreDiagnosticsExceptionResultKey is the attribute Key conforming |
| 235 |
// to the "aspnetcore.diagnostics.exception.result" semantic conventions. |
| 236 |
// It represents the aSP.NET Core exception middleware handling result |
| 237 |
// |
| 238 |
// Type: Enum |
| 239 |
// RequirementLevel: Optional |
| 240 |
// Stability: stable |
| 241 |
// Examples: 'handled', 'unhandled' |
| 242 |
ASPNETCoreDiagnosticsExceptionResultKey = attribute.Key("aspnetcore.diagnostics.exception.result") |
| 243 |
|
| 244 |
// ASPNETCoreRateLimitingPolicyKey is the attribute Key conforming to the |
| 245 |
// "aspnetcore.rate_limiting.policy" semantic conventions. It represents |
| 246 |
// the rate limiting policy name. |
| 247 |
// |
| 248 |
// Type: string |
| 249 |
// RequirementLevel: Optional |
| 250 |
// Stability: stable |
| 251 |
// Examples: 'fixed', 'sliding', 'token' |
| 252 |
ASPNETCoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy") |
| 253 |
|
| 254 |
// ASPNETCoreRequestIsUnhandledKey is the attribute Key conforming to the |
| 255 |
// "aspnetcore.request.is_unhandled" semantic conventions. It represents |
| 256 |
// the flag indicating if request was handled by the application pipeline. |
| 257 |
// |
| 258 |
// Type: boolean |
| 259 |
// RequirementLevel: Optional |
| 260 |
// Stability: stable |
| 261 |
// Examples: True |
| 262 |
ASPNETCoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled") |
| 263 |
|
| 264 |
// ASPNETCoreRoutingIsFallbackKey is the attribute Key conforming to the |
| 265 |
// "aspnetcore.routing.is_fallback" semantic conventions. It represents a |
| 266 |
// value that indicates whether the matched route is a fallback route. |
| 267 |
// |
| 268 |
// Type: boolean |
| 269 |
// RequirementLevel: Optional |
| 270 |
// Stability: stable |
| 271 |
// Examples: True |
| 272 |
ASPNETCoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback") |
| 273 |
|
| 274 |
// ASPNETCoreRoutingMatchStatusKey is the attribute Key conforming to the |
| 275 |
// "aspnetcore.routing.match_status" semantic conventions. It represents |
| 276 |
// the match result - success or failure |
| 277 |
// |
| 278 |
// Type: Enum |
| 279 |
// RequirementLevel: Optional |
| 280 |
// Stability: stable |
| 281 |
// Examples: 'success', 'failure' |
| 282 |
ASPNETCoreRoutingMatchStatusKey = attribute.Key("aspnetcore.routing.match_status") |
| 283 |
) |
| 284 |
|
| 285 |
var ( |
| 286 |
// Lease was acquired |
| 287 |
ASPNETCoreRateLimitingResultAcquired = ASPNETCoreRateLimitingResultKey.String("acquired") |
| 288 |
// Lease request was rejected by the endpoint limiter |
| 289 |
ASPNETCoreRateLimitingResultEndpointLimiter = ASPNETCoreRateLimitingResultKey.String("endpoint_limiter") |
| 290 |
// Lease request was rejected by the global limiter |
| 291 |
ASPNETCoreRateLimitingResultGlobalLimiter = ASPNETCoreRateLimitingResultKey.String("global_limiter") |
| 292 |
// Lease request was canceled |
| 293 |
ASPNETCoreRateLimitingResultRequestCanceled = ASPNETCoreRateLimitingResultKey.String("request_canceled") |
| 294 |
) |
| 295 |
|
| 296 |
var ( |
| 297 |
// Exception was handled by the exception handling middleware |
| 298 |
ASPNETCoreDiagnosticsExceptionResultHandled = ASPNETCoreDiagnosticsExceptionResultKey.String("handled") |
| 299 |
// Exception was not handled by the exception handling middleware |
| 300 |
ASPNETCoreDiagnosticsExceptionResultUnhandled = ASPNETCoreDiagnosticsExceptionResultKey.String("unhandled") |
| 301 |
// Exception handling was skipped because the response had started |
| 302 |
ASPNETCoreDiagnosticsExceptionResultSkipped = ASPNETCoreDiagnosticsExceptionResultKey.String("skipped") |
| 303 |
// Exception handling didn't run because the request was aborted |
| 304 |
ASPNETCoreDiagnosticsExceptionResultAborted = ASPNETCoreDiagnosticsExceptionResultKey.String("aborted") |
| 305 |
) |
| 306 |
|
| 307 |
var ( |
| 308 |
// Match succeeded |
| 309 |
ASPNETCoreRoutingMatchStatusSuccess = ASPNETCoreRoutingMatchStatusKey.String("success") |
| 310 |
// Match failed |
| 311 |
ASPNETCoreRoutingMatchStatusFailure = ASPNETCoreRoutingMatchStatusKey.String("failure") |
| 312 |
) |
| 313 |
|
| 314 |
// ASPNETCoreDiagnosticsHandlerType returns an attribute KeyValue conforming |
| 315 |
// to the "aspnetcore.diagnostics.handler.type" semantic conventions. It |
| 316 |
// represents the full type name of the |
| 317 |
// [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) |
| 318 |
// implementation that handled the exception. |
| 319 |
func ASPNETCoreDiagnosticsHandlerType(val string) attribute.KeyValue { |
| 320 |
return ASPNETCoreDiagnosticsHandlerTypeKey.String(val) |
| 321 |
} |
| 322 |
|
| 323 |
// ASPNETCoreRateLimitingPolicy returns an attribute KeyValue conforming to |
| 324 |
// the "aspnetcore.rate_limiting.policy" semantic conventions. It represents |
| 325 |
// the rate limiting policy name. |
| 326 |
func ASPNETCoreRateLimitingPolicy(val string) attribute.KeyValue { |
| 327 |
return ASPNETCoreRateLimitingPolicyKey.String(val) |
| 328 |
} |
| 329 |
|
| 330 |
// ASPNETCoreRequestIsUnhandled returns an attribute KeyValue conforming to |
| 331 |
// the "aspnetcore.request.is_unhandled" semantic conventions. It represents |
| 332 |
// the flag indicating if request was handled by the application pipeline. |
| 333 |
func ASPNETCoreRequestIsUnhandled(val bool) attribute.KeyValue { |
| 334 |
return ASPNETCoreRequestIsUnhandledKey.Bool(val) |
| 335 |
} |
| 336 |
|
| 337 |
// ASPNETCoreRoutingIsFallback returns an attribute KeyValue conforming to |
| 338 |
// the "aspnetcore.routing.is_fallback" semantic conventions. It represents a |
| 339 |
// value that indicates whether the matched route is a fallback route. |
| 340 |
func ASPNETCoreRoutingIsFallback(val bool) attribute.KeyValue { |
| 341 |
return ASPNETCoreRoutingIsFallbackKey.Bool(val) |
| 342 |
} |
| 343 |
|
| 344 |
// Generic attributes for AWS services. |
| 345 |
const ( |
| 346 |
// AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" |
| 347 |
// semantic conventions. It represents the AWS request ID as returned in |
| 348 |
// the response headers `x-amz-request-id` or `x-amz-requestid`. |
| 349 |
// |
| 350 |
// Type: string |
| 351 |
// RequirementLevel: Optional |
| 352 |
// Stability: experimental |
| 353 |
// Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' |
| 354 |
AWSRequestIDKey = attribute.Key("aws.request_id") |
| 355 |
) |
| 356 |
|
| 357 |
// AWSRequestID returns an attribute KeyValue conforming to the |
| 358 |
// "aws.request_id" semantic conventions. It represents the AWS request ID as |
| 359 |
// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. |
| 360 |
func AWSRequestID(val string) attribute.KeyValue { |
| 361 |
return AWSRequestIDKey.String(val) |
| 362 |
} |
| 363 |
|
| 364 |
// Attributes for AWS DynamoDB. |
| 365 |
const ( |
| 366 |
// AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to |
| 367 |
// the "aws.dynamodb.attribute_definitions" semantic conventions. It |
| 368 |
// represents the JSON-serialized value of each item in the |
| 369 |
// `AttributeDefinitions` request field. |
| 370 |
// |
| 371 |
// Type: string[] |
| 372 |
// RequirementLevel: Optional |
| 373 |
// Stability: experimental |
| 374 |
// Examples: '{ "AttributeName": "string", "AttributeType": "string" }' |
| 375 |
AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") |
| 376 |
|
| 377 |
// AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the |
| 378 |
// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the |
| 379 |
// value of the `AttributesToGet` request parameter. |
| 380 |
// |
| 381 |
// Type: string[] |
| 382 |
// RequirementLevel: Optional |
| 383 |
// Stability: experimental |
| 384 |
// Examples: 'lives', 'id' |
| 385 |
AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") |
| 386 |
|
| 387 |
// AWSDynamoDBConsistentReadKey is the attribute Key conforming to the |
| 388 |
// "aws.dynamodb.consistent_read" semantic conventions. It represents the |
| 389 |
// value of the `ConsistentRead` request parameter. |
| 390 |
// |
| 391 |
// Type: boolean |
| 392 |
// RequirementLevel: Optional |
| 393 |
// Stability: experimental |
| 394 |
AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") |
| 395 |
|
| 396 |
// AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the |
| 397 |
// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the |
| 398 |
// JSON-serialized value of each item in the `ConsumedCapacity` response |
| 399 |
// field. |
| 400 |
// |
| 401 |
// Type: string[] |
| 402 |
// RequirementLevel: Optional |
| 403 |
// Stability: experimental |
| 404 |
// Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { |
| 405 |
// "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 406 |
// "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : |
| 407 |
// { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 408 |
// "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": |
| 409 |
// { "CapacityUnits": number, "ReadCapacityUnits": number, |
| 410 |
// "WriteCapacityUnits": number }, "TableName": "string", |
| 411 |
// "WriteCapacityUnits": number }' |
| 412 |
AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") |
| 413 |
|
| 414 |
// AWSDynamoDBCountKey is the attribute Key conforming to the |
| 415 |
// "aws.dynamodb.count" semantic conventions. It represents the value of |
| 416 |
// the `Count` response parameter. |
| 417 |
// |
| 418 |
// Type: int |
| 419 |
// RequirementLevel: Optional |
| 420 |
// Stability: experimental |
| 421 |
// Examples: 10 |
| 422 |
AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") |
| 423 |
|
| 424 |
// AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the |
| 425 |
// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents |
| 426 |
// the value of the `ExclusiveStartTableName` request parameter. |
| 427 |
// |
| 428 |
// Type: string |
| 429 |
// RequirementLevel: Optional |
| 430 |
// Stability: experimental |
| 431 |
// Examples: 'Users', 'CatsTable' |
| 432 |
AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") |
| 433 |
|
| 434 |
// AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key |
| 435 |
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic |
| 436 |
// conventions. It represents the JSON-serialized value of each item in the |
| 437 |
// `GlobalSecondaryIndexUpdates` request field. |
| 438 |
// |
| 439 |
// Type: string[] |
| 440 |
// RequirementLevel: Optional |
| 441 |
// Stability: experimental |
| 442 |
// Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { |
| 443 |
// "AttributeName": "string", "KeyType": "string" } ], "Projection": { |
| 444 |
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, |
| 445 |
// "ProvisionedThroughput": { "ReadCapacityUnits": number, |
| 446 |
// "WriteCapacityUnits": number } }' |
| 447 |
AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") |
| 448 |
|
| 449 |
// AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to |
| 450 |
// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It |
| 451 |
// represents the JSON-serialized value of each item of the |
| 452 |
// `GlobalSecondaryIndexes` request field |
| 453 |
// |
| 454 |
// Type: string[] |
| 455 |
// RequirementLevel: Optional |
| 456 |
// Stability: experimental |
| 457 |
// Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": |
| 458 |
// "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ |
| 459 |
// "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { |
| 460 |
// "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' |
| 461 |
AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") |
| 462 |
|
| 463 |
// AWSDynamoDBIndexNameKey is the attribute Key conforming to the |
| 464 |
// "aws.dynamodb.index_name" semantic conventions. It represents the value |
| 465 |
// of the `IndexName` request parameter. |
| 466 |
// |
| 467 |
// Type: string |
| 468 |
// RequirementLevel: Optional |
| 469 |
// Stability: experimental |
| 470 |
// Examples: 'name_to_group' |
| 471 |
AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") |
| 472 |
|
| 473 |
// AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to |
| 474 |
// the "aws.dynamodb.item_collection_metrics" semantic conventions. It |
| 475 |
// represents the JSON-serialized value of the `ItemCollectionMetrics` |
| 476 |
// response field. |
| 477 |
// |
| 478 |
// Type: string |
| 479 |
// RequirementLevel: Optional |
| 480 |
// Stability: experimental |
| 481 |
// Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": |
| 482 |
// blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { |
| 483 |
// "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], |
| 484 |
// "NULL": boolean, "S": "string", "SS": [ "string" ] } }, |
| 485 |
// "SizeEstimateRangeGB": [ number ] } ] }' |
| 486 |
AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") |
| 487 |
|
| 488 |
// AWSDynamoDBLimitKey is the attribute Key conforming to the |
| 489 |
// "aws.dynamodb.limit" semantic conventions. It represents the value of |
| 490 |
// the `Limit` request parameter. |
| 491 |
// |
| 492 |
// Type: int |
| 493 |
// RequirementLevel: Optional |
| 494 |
// Stability: experimental |
| 495 |
// Examples: 10 |
| 496 |
AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") |
| 497 |
|
| 498 |
// AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to |
| 499 |
// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It |
| 500 |
// represents the JSON-serialized value of each item of the |
| 501 |
// `LocalSecondaryIndexes` request field. |
| 502 |
// |
| 503 |
// Type: string[] |
| 504 |
// RequirementLevel: Optional |
| 505 |
// Stability: experimental |
| 506 |
// Examples: '{ "IndexARN": "string", "IndexName": "string", |
| 507 |
// "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { |
| 508 |
// "AttributeName": "string", "KeyType": "string" } ], "Projection": { |
| 509 |
// "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' |
| 510 |
AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") |
| 511 |
|
| 512 |
// AWSDynamoDBProjectionKey is the attribute Key conforming to the |
| 513 |
// "aws.dynamodb.projection" semantic conventions. It represents the value |
| 514 |
// of the `ProjectionExpression` request parameter. |
| 515 |
// |
| 516 |
// Type: string |
| 517 |
// RequirementLevel: Optional |
| 518 |
// Stability: experimental |
| 519 |
// Examples: 'Title', 'Title, Price, Color', 'Title, Description, |
| 520 |
// RelatedItems, ProductReviews' |
| 521 |
AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") |
| 522 |
|
| 523 |
// AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to |
| 524 |
// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It |
| 525 |
// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` |
| 526 |
// request parameter. |
| 527 |
// |
| 528 |
// Type: double |
| 529 |
// RequirementLevel: Optional |
| 530 |
// Stability: experimental |
| 531 |
// Examples: 1.0, 2.0 |
| 532 |
AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") |
| 533 |
|
| 534 |
// AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming |
| 535 |
// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. |
| 536 |
// It represents the value of the |
| 537 |
// `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 538 |
// |
| 539 |
// Type: double |
| 540 |
// RequirementLevel: Optional |
| 541 |
// Stability: experimental |
| 542 |
// Examples: 1.0, 2.0 |
| 543 |
AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") |
| 544 |
|
| 545 |
// AWSDynamoDBScanForwardKey is the attribute Key conforming to the |
| 546 |
// "aws.dynamodb.scan_forward" semantic conventions. It represents the |
| 547 |
// value of the `ScanIndexForward` request parameter. |
| 548 |
// |
| 549 |
// Type: boolean |
| 550 |
// RequirementLevel: Optional |
| 551 |
// Stability: experimental |
| 552 |
AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") |
| 553 |
|
| 554 |
// AWSDynamoDBScannedCountKey is the attribute Key conforming to the |
| 555 |
// "aws.dynamodb.scanned_count" semantic conventions. It represents the |
| 556 |
// value of the `ScannedCount` response parameter. |
| 557 |
// |
| 558 |
// Type: int |
| 559 |
// RequirementLevel: Optional |
| 560 |
// Stability: experimental |
| 561 |
// Examples: 50 |
| 562 |
AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") |
| 563 |
|
| 564 |
// AWSDynamoDBSegmentKey is the attribute Key conforming to the |
| 565 |
// "aws.dynamodb.segment" semantic conventions. It represents the value of |
| 566 |
// the `Segment` request parameter. |
| 567 |
// |
| 568 |
// Type: int |
| 569 |
// RequirementLevel: Optional |
| 570 |
// Stability: experimental |
| 571 |
// Examples: 10 |
| 572 |
AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") |
| 573 |
|
| 574 |
// AWSDynamoDBSelectKey is the attribute Key conforming to the |
| 575 |
// "aws.dynamodb.select" semantic conventions. It represents the value of |
| 576 |
// the `Select` request parameter. |
| 577 |
// |
| 578 |
// Type: string |
| 579 |
// RequirementLevel: Optional |
| 580 |
// Stability: experimental |
| 581 |
// Examples: 'ALL_ATTRIBUTES', 'COUNT' |
| 582 |
AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") |
| 583 |
|
| 584 |
// AWSDynamoDBTableCountKey is the attribute Key conforming to the |
| 585 |
// "aws.dynamodb.table_count" semantic conventions. It represents the |
| 586 |
// number of items in the `TableNames` response parameter. |
| 587 |
// |
| 588 |
// Type: int |
| 589 |
// RequirementLevel: Optional |
| 590 |
// Stability: experimental |
| 591 |
// Examples: 20 |
| 592 |
AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") |
| 593 |
|
| 594 |
// AWSDynamoDBTableNamesKey is the attribute Key conforming to the |
| 595 |
// "aws.dynamodb.table_names" semantic conventions. It represents the keys |
| 596 |
// in the `RequestItems` object field. |
| 597 |
// |
| 598 |
// Type: string[] |
| 599 |
// RequirementLevel: Optional |
| 600 |
// Stability: experimental |
| 601 |
// Examples: 'Users', 'Cats' |
| 602 |
AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") |
| 603 |
|
| 604 |
// AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the |
| 605 |
// "aws.dynamodb.total_segments" semantic conventions. It represents the |
| 606 |
// value of the `TotalSegments` request parameter. |
| 607 |
// |
| 608 |
// Type: int |
| 609 |
// RequirementLevel: Optional |
| 610 |
// Stability: experimental |
| 611 |
// Examples: 100 |
| 612 |
AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") |
| 613 |
) |
| 614 |
|
| 615 |
// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming |
| 616 |
// to the "aws.dynamodb.attribute_definitions" semantic conventions. It |
| 617 |
// represents the JSON-serialized value of each item in the |
| 618 |
// `AttributeDefinitions` request field. |
| 619 |
func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { |
| 620 |
return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) |
| 621 |
} |
| 622 |
|
| 623 |
// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to |
| 624 |
// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the |
| 625 |
// value of the `AttributesToGet` request parameter. |
| 626 |
func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { |
| 627 |
return AWSDynamoDBAttributesToGetKey.StringSlice(val) |
| 628 |
} |
| 629 |
|
| 630 |
// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the |
| 631 |
// "aws.dynamodb.consistent_read" semantic conventions. It represents the value |
| 632 |
// of the `ConsistentRead` request parameter. |
| 633 |
func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { |
| 634 |
return AWSDynamoDBConsistentReadKey.Bool(val) |
| 635 |
} |
| 636 |
|
| 637 |
// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to |
| 638 |
// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the |
| 639 |
// JSON-serialized value of each item in the `ConsumedCapacity` response field. |
| 640 |
func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { |
| 641 |
return AWSDynamoDBConsumedCapacityKey.StringSlice(val) |
| 642 |
} |
| 643 |
|
| 644 |
// AWSDynamoDBCount returns an attribute KeyValue conforming to the |
| 645 |
// "aws.dynamodb.count" semantic conventions. It represents the value of the |
| 646 |
// `Count` response parameter. |
| 647 |
func AWSDynamoDBCount(val int) attribute.KeyValue { |
| 648 |
return AWSDynamoDBCountKey.Int(val) |
| 649 |
} |
| 650 |
|
| 651 |
// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming |
| 652 |
// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It |
| 653 |
// represents the value of the `ExclusiveStartTableName` request parameter. |
| 654 |
func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { |
| 655 |
return AWSDynamoDBExclusiveStartTableKey.String(val) |
| 656 |
} |
| 657 |
|
| 658 |
// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue |
| 659 |
// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic |
| 660 |
// conventions. It represents the JSON-serialized value of each item in the |
| 661 |
// `GlobalSecondaryIndexUpdates` request field. |
| 662 |
func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { |
| 663 |
return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) |
| 664 |
} |
| 665 |
|
| 666 |
// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue |
| 667 |
// conforming to the "aws.dynamodb.global_secondary_indexes" semantic |
| 668 |
// conventions. It represents the JSON-serialized value of each item of the |
| 669 |
// `GlobalSecondaryIndexes` request field |
| 670 |
func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { |
| 671 |
return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) |
| 672 |
} |
| 673 |
|
| 674 |
// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the |
| 675 |
// "aws.dynamodb.index_name" semantic conventions. It represents the value of |
| 676 |
// the `IndexName` request parameter. |
| 677 |
func AWSDynamoDBIndexName(val string) attribute.KeyValue { |
| 678 |
return AWSDynamoDBIndexNameKey.String(val) |
| 679 |
} |
| 680 |
|
| 681 |
// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming |
| 682 |
// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It |
| 683 |
// represents the JSON-serialized value of the `ItemCollectionMetrics` response |
| 684 |
// field. |
| 685 |
func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { |
| 686 |
return AWSDynamoDBItemCollectionMetricsKey.String(val) |
| 687 |
} |
| 688 |
|
| 689 |
// AWSDynamoDBLimit returns an attribute KeyValue conforming to the |
| 690 |
// "aws.dynamodb.limit" semantic conventions. It represents the value of the |
| 691 |
// `Limit` request parameter. |
| 692 |
func AWSDynamoDBLimit(val int) attribute.KeyValue { |
| 693 |
return AWSDynamoDBLimitKey.Int(val) |
| 694 |
} |
| 695 |
|
| 696 |
// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming |
| 697 |
// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It |
| 698 |
// represents the JSON-serialized value of each item of the |
| 699 |
// `LocalSecondaryIndexes` request field. |
| 700 |
func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { |
| 701 |
return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) |
| 702 |
} |
| 703 |
|
| 704 |
// AWSDynamoDBProjection returns an attribute KeyValue conforming to the |
| 705 |
// "aws.dynamodb.projection" semantic conventions. It represents the value of |
| 706 |
// the `ProjectionExpression` request parameter. |
| 707 |
func AWSDynamoDBProjection(val string) attribute.KeyValue { |
| 708 |
return AWSDynamoDBProjectionKey.String(val) |
| 709 |
} |
| 710 |
|
| 711 |
// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue |
| 712 |
// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic |
| 713 |
// conventions. It represents the value of the |
| 714 |
// `ProvisionedThroughput.ReadCapacityUnits` request parameter. |
| 715 |
func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { |
| 716 |
return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) |
| 717 |
} |
| 718 |
|
| 719 |
// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue |
| 720 |
// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic |
| 721 |
// conventions. It represents the value of the |
| 722 |
// `ProvisionedThroughput.WriteCapacityUnits` request parameter. |
| 723 |
func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { |
| 724 |
return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) |
| 725 |
} |
| 726 |
|
| 727 |
// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the |
| 728 |
// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of |
| 729 |
// the `ScanIndexForward` request parameter. |
| 730 |
func AWSDynamoDBScanForward(val bool) attribute.KeyValue { |
| 731 |
return AWSDynamoDBScanForwardKey.Bool(val) |
| 732 |
} |
| 733 |
|
| 734 |
// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the |
| 735 |
// "aws.dynamodb.scanned_count" semantic conventions. It represents the value |
| 736 |
// of the `ScannedCount` response parameter. |
| 737 |
func AWSDynamoDBScannedCount(val int) attribute.KeyValue { |
| 738 |
return AWSDynamoDBScannedCountKey.Int(val) |
| 739 |
} |
| 740 |
|
| 741 |
// AWSDynamoDBSegment returns an attribute KeyValue conforming to the |
| 742 |
// "aws.dynamodb.segment" semantic conventions. It represents the value of the |
| 743 |
// `Segment` request parameter. |
| 744 |
func AWSDynamoDBSegment(val int) attribute.KeyValue { |
| 745 |
return AWSDynamoDBSegmentKey.Int(val) |
| 746 |
} |
| 747 |
|
| 748 |
// AWSDynamoDBSelect returns an attribute KeyValue conforming to the |
| 749 |
// "aws.dynamodb.select" semantic conventions. It represents the value of the |
| 750 |
// `Select` request parameter. |
| 751 |
func AWSDynamoDBSelect(val string) attribute.KeyValue { |
| 752 |
return AWSDynamoDBSelectKey.String(val) |
| 753 |
} |
| 754 |
|
| 755 |
// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the |
| 756 |
// "aws.dynamodb.table_count" semantic conventions. It represents the number of |
| 757 |
// items in the `TableNames` response parameter. |
| 758 |
func AWSDynamoDBTableCount(val int) attribute.KeyValue { |
| 759 |
return AWSDynamoDBTableCountKey.Int(val) |
| 760 |
} |
| 761 |
|
| 762 |
// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the |
| 763 |
// "aws.dynamodb.table_names" semantic conventions. It represents the keys in |
| 764 |
// the `RequestItems` object field. |
| 765 |
func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { |
| 766 |
return AWSDynamoDBTableNamesKey.StringSlice(val) |
| 767 |
} |
| 768 |
|
| 769 |
// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the |
| 770 |
// "aws.dynamodb.total_segments" semantic conventions. It represents the value |
| 771 |
// of the `TotalSegments` request parameter. |
| 772 |
func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { |
| 773 |
return AWSDynamoDBTotalSegmentsKey.Int(val) |
| 774 |
} |
| 775 |
|
| 776 |
// Attributes for AWS Elastic Container Service (ECS). |
| 777 |
const ( |
| 778 |
// AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id" |
| 779 |
// semantic conventions. It represents the ID of a running ECS task. The ID |
| 780 |
// MUST be extracted from `task.arn`. |
| 781 |
// |
| 782 |
// Type: string |
| 783 |
// RequirementLevel: ConditionallyRequired (If and only if `task.arn` is |
| 784 |
// populated.) |
| 785 |
// Stability: experimental |
| 786 |
// Examples: '10838bed-421f-43ef-870a-f43feacbbb5b', |
| 787 |
// '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' |
| 788 |
AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id") |
| 789 |
|
| 790 |
// AWSECSClusterARNKey is the attribute Key conforming to the |
| 791 |
// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an |
| 792 |
// [ECS |
| 793 |
// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). |
| 794 |
// |
| 795 |
// Type: string |
| 796 |
// RequirementLevel: Optional |
| 797 |
// Stability: experimental |
| 798 |
// Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' |
| 799 |
AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") |
| 800 |
|
| 801 |
// AWSECSContainerARNKey is the attribute Key conforming to the |
| 802 |
// "aws.ecs.container.arn" semantic conventions. It represents the Amazon |
| 803 |
// Resource Name (ARN) of an [ECS container |
| 804 |
// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). |
| 805 |
// |
| 806 |
// Type: string |
| 807 |
// RequirementLevel: Optional |
| 808 |
// Stability: experimental |
| 809 |
// Examples: |
| 810 |
// 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' |
| 811 |
AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") |
| 812 |
|
| 813 |
// AWSECSLaunchtypeKey is the attribute Key conforming to the |
| 814 |
// "aws.ecs.launchtype" semantic conventions. It represents the [launch |
| 815 |
// type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) |
| 816 |
// for an ECS task. |
| 817 |
// |
| 818 |
// Type: Enum |
| 819 |
// RequirementLevel: Optional |
| 820 |
// Stability: experimental |
| 821 |
AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") |
| 822 |
|
| 823 |
// AWSECSTaskARNKey is the attribute Key conforming to the |
| 824 |
// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a |
| 825 |
// running [ECS |
| 826 |
// task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). |
| 827 |
// |
| 828 |
// Type: string |
| 829 |
// RequirementLevel: Optional |
| 830 |
// Stability: experimental |
| 831 |
// Examples: |
| 832 |
// 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', |
| 833 |
// 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' |
| 834 |
AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") |
| 835 |
|
| 836 |
// AWSECSTaskFamilyKey is the attribute Key conforming to the |
| 837 |
// "aws.ecs.task.family" semantic conventions. It represents the family |
| 838 |
// name of the [ECS task |
| 839 |
// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) |
| 840 |
// used to create the ECS task. |
| 841 |
// |
| 842 |
// Type: string |
| 843 |
// RequirementLevel: Optional |
| 844 |
// Stability: experimental |
| 845 |
// Examples: 'opentelemetry-family' |
| 846 |
AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") |
| 847 |
|
| 848 |
// AWSECSTaskRevisionKey is the attribute Key conforming to the |
| 849 |
// "aws.ecs.task.revision" semantic conventions. It represents the revision |
| 850 |
// for the task definition used to create the ECS task. |
| 851 |
// |
| 852 |
// Type: string |
| 853 |
// RequirementLevel: Optional |
| 854 |
// Stability: experimental |
| 855 |
// Examples: '8', '26' |
| 856 |
AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") |
| 857 |
) |
| 858 |
|
| 859 |
var ( |
| 860 |
// ec2 |
| 861 |
AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") |
| 862 |
// fargate |
| 863 |
AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") |
| 864 |
) |
| 865 |
|
| 866 |
// AWSECSTaskID returns an attribute KeyValue conforming to the |
| 867 |
// "aws.ecs.task.id" semantic conventions. It represents the ID of a running |
| 868 |
// ECS task. The ID MUST be extracted from `task.arn`. |
| 869 |
func AWSECSTaskID(val string) attribute.KeyValue { |
| 870 |
return AWSECSTaskIDKey.String(val) |
| 871 |
} |
| 872 |
|
| 873 |
// AWSECSClusterARN returns an attribute KeyValue conforming to the |
| 874 |
// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS |
| 875 |
// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). |
| 876 |
func AWSECSClusterARN(val string) attribute.KeyValue { |
| 877 |
return AWSECSClusterARNKey.String(val) |
| 878 |
} |
| 879 |
|
| 880 |
// AWSECSContainerARN returns an attribute KeyValue conforming to the |
| 881 |
// "aws.ecs.container.arn" semantic conventions. It represents the Amazon |
| 882 |
// Resource Name (ARN) of an [ECS container |
| 883 |
// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). |
| 884 |
func AWSECSContainerARN(val string) attribute.KeyValue { |
| 885 |
return AWSECSContainerARNKey.String(val) |
| 886 |
} |
| 887 |
|
| 888 |
// AWSECSTaskARN returns an attribute KeyValue conforming to the |
| 889 |
// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running |
| 890 |
// [ECS |
| 891 |
// task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). |
| 892 |
func AWSECSTaskARN(val string) attribute.KeyValue { |
| 893 |
return AWSECSTaskARNKey.String(val) |
| 894 |
} |
| 895 |
|
| 896 |
// AWSECSTaskFamily returns an attribute KeyValue conforming to the |
| 897 |
// "aws.ecs.task.family" semantic conventions. It represents the family name of |
| 898 |
// the [ECS task |
| 899 |
// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) |
| 900 |
// used to create the ECS task. |
| 901 |
func AWSECSTaskFamily(val string) attribute.KeyValue { |
| 902 |
return AWSECSTaskFamilyKey.String(val) |
| 903 |
} |
| 904 |
|
| 905 |
// AWSECSTaskRevision returns an attribute KeyValue conforming to the |
| 906 |
// "aws.ecs.task.revision" semantic conventions. It represents the revision for |
| 907 |
// the task definition used to create the ECS task. |
| 908 |
func AWSECSTaskRevision(val string) attribute.KeyValue { |
| 909 |
return AWSECSTaskRevisionKey.String(val) |
| 910 |
} |
| 911 |
|
| 912 |
// Attributes for AWS Elastic Kubernetes Service (EKS). |
| 913 |
const ( |
| 914 |
// AWSEKSClusterARNKey is the attribute Key conforming to the |
| 915 |
// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an |
| 916 |
// EKS cluster. |
| 917 |
// |
| 918 |
// Type: string |
| 919 |
// RequirementLevel: Optional |
| 920 |
// Stability: experimental |
| 921 |
// Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' |
| 922 |
AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") |
| 923 |
) |
| 924 |
|
| 925 |
// AWSEKSClusterARN returns an attribute KeyValue conforming to the |
| 926 |
// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS |
| 927 |
// cluster. |
| 928 |
func AWSEKSClusterARN(val string) attribute.KeyValue { |
| 929 |
return AWSEKSClusterARNKey.String(val) |
| 930 |
} |
| 931 |
|
| 932 |
// Attributes for AWS Logs. |
| 933 |
const ( |
| 934 |
// AWSLogGroupARNsKey is the attribute Key conforming to the |
| 935 |
// "aws.log.group.arns" semantic conventions. It represents the Amazon |
| 936 |
// Resource Name(s) (ARN) of the AWS log group(s). |
| 937 |
// |
| 938 |
// Type: string[] |
| 939 |
// RequirementLevel: Optional |
| 940 |
// Stability: experimental |
| 941 |
// Examples: |
| 942 |
// 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' |
| 943 |
// Note: See the [log group ARN format |
| 944 |
// documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). |
| 945 |
AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") |
| 946 |
|
| 947 |
// AWSLogGroupNamesKey is the attribute Key conforming to the |
| 948 |
// "aws.log.group.names" semantic conventions. It represents the name(s) of |
| 949 |
// the AWS log group(s) an application is writing to. |
| 950 |
// |
| 951 |
// Type: string[] |
| 952 |
// RequirementLevel: Optional |
| 953 |
// Stability: experimental |
| 954 |
// Examples: '/aws/lambda/my-function', 'opentelemetry-service' |
| 955 |
// Note: Multiple log groups must be supported for cases like |
| 956 |
// multi-container applications, where a single application has sidecar |
| 957 |
// containers, and each write to their own log group. |
| 958 |
AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") |
| 959 |
|
| 960 |
// AWSLogStreamARNsKey is the attribute Key conforming to the |
| 961 |
// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of |
| 962 |
// the AWS log stream(s). |
| 963 |
// |
| 964 |
// Type: string[] |
| 965 |
// RequirementLevel: Optional |
| 966 |
// Stability: experimental |
| 967 |
// Examples: |
| 968 |
// 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' |
| 969 |
// Note: See the [log stream ARN format |
| 970 |
// documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). |
| 971 |
// One log group can contain several log streams, so these ARNs necessarily |
| 972 |
// identify both a log group and a log stream. |
| 973 |
AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") |
| 974 |
|
| 975 |
// AWSLogStreamNamesKey is the attribute Key conforming to the |
| 976 |
// "aws.log.stream.names" semantic conventions. It represents the name(s) |
| 977 |
// of the AWS log stream(s) an application is writing to. |
| 978 |
// |
| 979 |
// Type: string[] |
| 980 |
// RequirementLevel: Optional |
| 981 |
// Stability: experimental |
| 982 |
// Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' |
| 983 |
AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") |
| 984 |
) |
| 985 |
|
| 986 |
// AWSLogGroupARNs returns an attribute KeyValue conforming to the |
| 987 |
// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource |
| 988 |
// Name(s) (ARN) of the AWS log group(s). |
| 989 |
func AWSLogGroupARNs(val ...string) attribute.KeyValue { |
| 990 |
return AWSLogGroupARNsKey.StringSlice(val) |
| 991 |
} |
| 992 |
|
| 993 |
// AWSLogGroupNames returns an attribute KeyValue conforming to the |
| 994 |
// "aws.log.group.names" semantic conventions. It represents the name(s) of the |
| 995 |
// AWS log group(s) an application is writing to. |
| 996 |
func AWSLogGroupNames(val ...string) attribute.KeyValue { |
| 997 |
return AWSLogGroupNamesKey.StringSlice(val) |
| 998 |
} |
| 999 |
|
| 1000 |
// AWSLogStreamARNs returns an attribute KeyValue conforming to the |
| 1001 |
// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the |
| 1002 |
// AWS log stream(s). |
| 1003 |
func AWSLogStreamARNs(val ...string) attribute.KeyValue { |
| 1004 |
return AWSLogStreamARNsKey.StringSlice(val) |
| 1005 |
} |
| 1006 |
|
| 1007 |
// AWSLogStreamNames returns an attribute KeyValue conforming to the |
| 1008 |
// "aws.log.stream.names" semantic conventions. It represents the name(s) of |
| 1009 |
// the AWS log stream(s) an application is writing to. |
| 1010 |
func AWSLogStreamNames(val ...string) attribute.KeyValue { |
| 1011 |
return AWSLogStreamNamesKey.StringSlice(val) |
| 1012 |
} |
| 1013 |
|
| 1014 |
// Attributes for AWS Lambda. |
| 1015 |
const ( |
| 1016 |
// AWSLambdaInvokedARNKey is the attribute Key conforming to the |
| 1017 |
// "aws.lambda.invoked_arn" semantic conventions. It represents the full |
| 1018 |
// invoked ARN as provided on the `Context` passed to the function |
| 1019 |
// (`Lambda-Runtime-Invoked-Function-ARN` header on the |
| 1020 |
// `/runtime/invocation/next` applicable). |
| 1021 |
// |
| 1022 |
// Type: string |
| 1023 |
// RequirementLevel: Optional |
| 1024 |
// Stability: experimental |
| 1025 |
// Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' |
| 1026 |
// Note: This may be different from `cloud.resource_id` if an alias is |
| 1027 |
// involved. |
| 1028 |
AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") |
| 1029 |
) |
| 1030 |
|
| 1031 |
// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the |
| 1032 |
// "aws.lambda.invoked_arn" semantic conventions. It represents the full |
| 1033 |
// invoked ARN as provided on the `Context` passed to the function |
| 1034 |
// (`Lambda-Runtime-Invoked-Function-ARN` header on the |
| 1035 |
// `/runtime/invocation/next` applicable). |
| 1036 |
func AWSLambdaInvokedARN(val string) attribute.KeyValue { |
| 1037 |
return AWSLambdaInvokedARNKey.String(val) |
| 1038 |
} |
| 1039 |
|
| 1040 |
// Attributes for AWS S3. |
| 1041 |
const ( |
| 1042 |
// AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" |
| 1043 |
// semantic conventions. It represents the S3 bucket name the request |
| 1044 |
// refers to. Corresponds to the `--bucket` parameter of the [S3 |
| 1045 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1046 |
// operations. |
| 1047 |
// |
| 1048 |
// Type: string |
| 1049 |
// RequirementLevel: Optional |
| 1050 |
// Stability: experimental |
| 1051 |
// Examples: 'some-bucket-name' |
| 1052 |
// Note: The `bucket` attribute is applicable to all S3 operations that |
| 1053 |
// reference a bucket, i.e. that require the bucket name as a mandatory |
| 1054 |
// parameter. |
| 1055 |
// This applies to almost all S3 operations except `list-buckets`. |
| 1056 |
AWSS3BucketKey = attribute.Key("aws.s3.bucket") |
| 1057 |
|
| 1058 |
// AWSS3CopySourceKey is the attribute Key conforming to the |
| 1059 |
// "aws.s3.copy_source" semantic conventions. It represents the source |
| 1060 |
// object (in the form `bucket`/`key`) for the copy operation. |
| 1061 |
// |
| 1062 |
// Type: string |
| 1063 |
// RequirementLevel: Optional |
| 1064 |
// Stability: experimental |
| 1065 |
// Examples: 'someFile.yml' |
| 1066 |
// Note: The `copy_source` attribute applies to S3 copy operations and |
| 1067 |
// corresponds to the `--copy-source` parameter |
| 1068 |
// of the [copy-object operation within the S3 |
| 1069 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). |
| 1070 |
// This applies in particular to the following operations: |
| 1071 |
// |
| 1072 |
// - |
| 1073 |
// [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) |
| 1074 |
// - |
| 1075 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1076 |
AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") |
| 1077 |
|
| 1078 |
// AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" |
| 1079 |
// semantic conventions. It represents the delete request container that |
| 1080 |
// specifies the objects to be deleted. |
| 1081 |
// |
| 1082 |
// Type: string |
| 1083 |
// RequirementLevel: Optional |
| 1084 |
// Stability: experimental |
| 1085 |
// Examples: |
| 1086 |
// 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' |
| 1087 |
// Note: The `delete` attribute is only applicable to the |
| 1088 |
// [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) |
| 1089 |
// operation. |
| 1090 |
// The `delete` attribute corresponds to the `--delete` parameter of the |
| 1091 |
// [delete-objects operation within the S3 |
| 1092 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). |
| 1093 |
AWSS3DeleteKey = attribute.Key("aws.s3.delete") |
| 1094 |
|
| 1095 |
// AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic |
| 1096 |
// conventions. It represents the S3 object key the request refers to. |
| 1097 |
// Corresponds to the `--key` parameter of the [S3 |
| 1098 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1099 |
// operations. |
| 1100 |
// |
| 1101 |
// Type: string |
| 1102 |
// RequirementLevel: Optional |
| 1103 |
// Stability: experimental |
| 1104 |
// Examples: 'someFile.yml' |
| 1105 |
// Note: The `key` attribute is applicable to all object-related S3 |
| 1106 |
// operations, i.e. that require the object key as a mandatory parameter. |
| 1107 |
// This applies in particular to the following operations: |
| 1108 |
// |
| 1109 |
// - |
| 1110 |
// [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) |
| 1111 |
// - |
| 1112 |
// [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) |
| 1113 |
// - |
| 1114 |
// [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) |
| 1115 |
// - |
| 1116 |
// [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) |
| 1117 |
// - |
| 1118 |
// [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) |
| 1119 |
// - |
| 1120 |
// [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) |
| 1121 |
// - |
| 1122 |
// [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) |
| 1123 |
// - |
| 1124 |
// [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) |
| 1125 |
// - |
| 1126 |
// [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) |
| 1127 |
// - |
| 1128 |
// [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) |
| 1129 |
// - |
| 1130 |
// [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) |
| 1131 |
// - |
| 1132 |
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 1133 |
// - |
| 1134 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1135 |
AWSS3KeyKey = attribute.Key("aws.s3.key") |
| 1136 |
|
| 1137 |
// AWSS3PartNumberKey is the attribute Key conforming to the |
| 1138 |
// "aws.s3.part_number" semantic conventions. It represents the part number |
| 1139 |
// of the part being uploaded in a multipart-upload operation. This is a |
| 1140 |
// positive integer between 1 and 10,000. |
| 1141 |
// |
| 1142 |
// Type: int |
| 1143 |
// RequirementLevel: Optional |
| 1144 |
// Stability: experimental |
| 1145 |
// Examples: 3456 |
| 1146 |
// Note: The `part_number` attribute is only applicable to the |
| 1147 |
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 1148 |
// and |
| 1149 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1150 |
// operations. |
| 1151 |
// The `part_number` attribute corresponds to the `--part-number` parameter |
| 1152 |
// of the |
| 1153 |
// [upload-part operation within the S3 |
| 1154 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). |
| 1155 |
AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") |
| 1156 |
|
| 1157 |
// AWSS3UploadIDKey is the attribute Key conforming to the |
| 1158 |
// "aws.s3.upload_id" semantic conventions. It represents the upload ID |
| 1159 |
// that identifies the multipart upload. |
| 1160 |
// |
| 1161 |
// Type: string |
| 1162 |
// RequirementLevel: Optional |
| 1163 |
// Stability: experimental |
| 1164 |
// Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' |
| 1165 |
// Note: The `upload_id` attribute applies to S3 multipart-upload |
| 1166 |
// operations and corresponds to the `--upload-id` parameter |
| 1167 |
// of the [S3 |
| 1168 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1169 |
// multipart operations. |
| 1170 |
// This applies in particular to the following operations: |
| 1171 |
// |
| 1172 |
// - |
| 1173 |
// [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) |
| 1174 |
// - |
| 1175 |
// [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) |
| 1176 |
// - |
| 1177 |
// [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) |
| 1178 |
// - |
| 1179 |
// [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) |
| 1180 |
// - |
| 1181 |
// [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) |
| 1182 |
AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") |
| 1183 |
) |
| 1184 |
|
| 1185 |
// AWSS3Bucket returns an attribute KeyValue conforming to the |
| 1186 |
// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the |
| 1187 |
// request refers to. Corresponds to the `--bucket` parameter of the [S3 |
| 1188 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1189 |
// operations. |
| 1190 |
func AWSS3Bucket(val string) attribute.KeyValue { |
| 1191 |
return AWSS3BucketKey.String(val) |
| 1192 |
} |
| 1193 |
|
| 1194 |
// AWSS3CopySource returns an attribute KeyValue conforming to the |
| 1195 |
// "aws.s3.copy_source" semantic conventions. It represents the source object |
| 1196 |
// (in the form `bucket`/`key`) for the copy operation. |
| 1197 |
func AWSS3CopySource(val string) attribute.KeyValue { |
| 1198 |
return AWSS3CopySourceKey.String(val) |
| 1199 |
} |
| 1200 |
|
| 1201 |
// AWSS3Delete returns an attribute KeyValue conforming to the |
| 1202 |
// "aws.s3.delete" semantic conventions. It represents the delete request |
| 1203 |
// container that specifies the objects to be deleted. |
| 1204 |
func AWSS3Delete(val string) attribute.KeyValue { |
| 1205 |
return AWSS3DeleteKey.String(val) |
| 1206 |
} |
| 1207 |
|
| 1208 |
// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" |
| 1209 |
// semantic conventions. It represents the S3 object key the request refers to. |
| 1210 |
// Corresponds to the `--key` parameter of the [S3 |
| 1211 |
// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) |
| 1212 |
// operations. |
| 1213 |
func AWSS3Key(val string) attribute.KeyValue { |
| 1214 |
return AWSS3KeyKey.String(val) |
| 1215 |
} |
| 1216 |
|
| 1217 |
// AWSS3PartNumber returns an attribute KeyValue conforming to the |
| 1218 |
// "aws.s3.part_number" semantic conventions. It represents the part number of |
| 1219 |
// the part being uploaded in a multipart-upload operation. This is a positive |
| 1220 |
// integer between 1 and 10,000. |
| 1221 |
func AWSS3PartNumber(val int) attribute.KeyValue { |
| 1222 |
return AWSS3PartNumberKey.Int(val) |
| 1223 |
} |
| 1224 |
|
| 1225 |
// AWSS3UploadID returns an attribute KeyValue conforming to the |
| 1226 |
// "aws.s3.upload_id" semantic conventions. It represents the upload ID that |
| 1227 |
// identifies the multipart upload. |
| 1228 |
func AWSS3UploadID(val string) attribute.KeyValue { |
| 1229 |
return AWSS3UploadIDKey.String(val) |
| 1230 |
} |
| 1231 |
|
| 1232 |
// Generic attributes for Azure SDK. |
| 1233 |
const ( |
| 1234 |
// AzServiceRequestIDKey is the attribute Key conforming to the |
| 1235 |
// "az.service_request_id" semantic conventions. It represents the unique |
| 1236 |
// identifier of the service request. It's generated by the Azure service |
| 1237 |
// and returned with the response. |
| 1238 |
// |
| 1239 |
// Type: string |
| 1240 |
// RequirementLevel: Optional |
| 1241 |
// Stability: experimental |
| 1242 |
// Examples: '00000000-0000-0000-0000-000000000000' |
| 1243 |
AzServiceRequestIDKey = attribute.Key("az.service_request_id") |
| 1244 |
) |
| 1245 |
|
| 1246 |
// AzServiceRequestID returns an attribute KeyValue conforming to the |
| 1247 |
// "az.service_request_id" semantic conventions. It represents the unique |
| 1248 |
// identifier of the service request. It's generated by the Azure service and |
| 1249 |
// returned with the response. |
| 1250 |
func AzServiceRequestID(val string) attribute.KeyValue { |
| 1251 |
return AzServiceRequestIDKey.String(val) |
| 1252 |
} |
| 1253 |
|
| 1254 |
// The web browser attributes |
| 1255 |
const ( |
| 1256 |
// BrowserBrandsKey is the attribute Key conforming to the "browser.brands" |
| 1257 |
// semantic conventions. It represents the array of brand name and version |
| 1258 |
// separated by a space |
| 1259 |
// |
| 1260 |
// Type: string[] |
| 1261 |
// RequirementLevel: Optional |
| 1262 |
// Stability: experimental |
| 1263 |
// Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' |
| 1264 |
// Note: This value is intended to be taken from the [UA client hints |
| 1265 |
// API](https://wicg.github.io/ua-client-hints/#interface) |
| 1266 |
// (`navigator.userAgentData.brands`). |
| 1267 |
BrowserBrandsKey = attribute.Key("browser.brands") |
| 1268 |
|
| 1269 |
// BrowserLanguageKey is the attribute Key conforming to the |
| 1270 |
// "browser.language" semantic conventions. It represents the preferred |
| 1271 |
// language of the user using the browser |
| 1272 |
// |
| 1273 |
// Type: string |
| 1274 |
// RequirementLevel: Optional |
| 1275 |
// Stability: experimental |
| 1276 |
// Examples: 'en', 'en-US', 'fr', 'fr-FR' |
| 1277 |
// Note: This value is intended to be taken from the Navigator API |
| 1278 |
// `navigator.language`. |
| 1279 |
BrowserLanguageKey = attribute.Key("browser.language") |
| 1280 |
|
| 1281 |
// BrowserMobileKey is the attribute Key conforming to the "browser.mobile" |
| 1282 |
// semantic conventions. It represents a boolean that is true if the |
| 1283 |
// browser is running on a mobile device |
| 1284 |
// |
| 1285 |
// Type: boolean |
| 1286 |
// RequirementLevel: Optional |
| 1287 |
// Stability: experimental |
| 1288 |
// Note: This value is intended to be taken from the [UA client hints |
| 1289 |
// API](https://wicg.github.io/ua-client-hints/#interface) |
| 1290 |
// (`navigator.userAgentData.mobile`). If unavailable, this attribute |
| 1291 |
// SHOULD be left unset. |
| 1292 |
BrowserMobileKey = attribute.Key("browser.mobile") |
| 1293 |
|
| 1294 |
// BrowserPlatformKey is the attribute Key conforming to the |
| 1295 |
// "browser.platform" semantic conventions. It represents the platform on |
| 1296 |
// which the browser is running |
| 1297 |
// |
| 1298 |
// Type: string |
| 1299 |
// RequirementLevel: Optional |
| 1300 |
// Stability: experimental |
| 1301 |
// Examples: 'Windows', 'macOS', 'Android' |
| 1302 |
// Note: This value is intended to be taken from the [UA client hints |
| 1303 |
// API](https://wicg.github.io/ua-client-hints/#interface) |
| 1304 |
// (`navigator.userAgentData.platform`). If unavailable, the legacy |
| 1305 |
// `navigator.platform` API SHOULD NOT be used instead and this attribute |
| 1306 |
// SHOULD be left unset in order for the values to be consistent. |
| 1307 |
// The list of possible values is defined in the [W3C User-Agent Client |
| 1308 |
// Hints |
| 1309 |
// specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). |
| 1310 |
// Note that some (but not all) of these values can overlap with values in |
| 1311 |
// the [`os.type` and `os.name` attributes](./os.md). However, for |
| 1312 |
// consistency, the values in the `browser.platform` attribute should |
| 1313 |
// capture the exact value that the user agent provides. |
| 1314 |
BrowserPlatformKey = attribute.Key("browser.platform") |
| 1315 |
) |
| 1316 |
|
| 1317 |
// BrowserBrands returns an attribute KeyValue conforming to the |
| 1318 |
// "browser.brands" semantic conventions. It represents the array of brand name |
| 1319 |
// and version separated by a space |
| 1320 |
func BrowserBrands(val ...string) attribute.KeyValue { |
| 1321 |
return BrowserBrandsKey.StringSlice(val) |
| 1322 |
} |
| 1323 |
|
| 1324 |
// BrowserLanguage returns an attribute KeyValue conforming to the |
| 1325 |
// "browser.language" semantic conventions. It represents the preferred |
| 1326 |
// language of the user using the browser |
| 1327 |
func BrowserLanguage(val string) attribute.KeyValue { |
| 1328 |
return BrowserLanguageKey.String(val) |
| 1329 |
} |
| 1330 |
|
| 1331 |
// BrowserMobile returns an attribute KeyValue conforming to the |
| 1332 |
// "browser.mobile" semantic conventions. It represents a boolean that is true |
| 1333 |
// if the browser is running on a mobile device |
| 1334 |
func BrowserMobile(val bool) attribute.KeyValue { |
| 1335 |
return BrowserMobileKey.Bool(val) |
| 1336 |
} |
| 1337 |
|
| 1338 |
// BrowserPlatform returns an attribute KeyValue conforming to the |
| 1339 |
// "browser.platform" semantic conventions. It represents the platform on which |
| 1340 |
// the browser is running |
| 1341 |
func BrowserPlatform(val string) attribute.KeyValue { |
| 1342 |
return BrowserPlatformKey.String(val) |
| 1343 |
} |
| 1344 |
|
| 1345 |
// This group describes attributes specific to pipelines within a Continuous |
| 1346 |
// Integration and Continuous Deployment (CI/CD) system. A |
| 1347 |
// [pipeline](https://en.wikipedia.org/wiki/Pipeline_(computing)) in this case |
| 1348 |
// is a series of steps that are performed in order to deliver a new version of |
| 1349 |
// software. This aligns with the |
| 1350 |
// [Britannica](https://www.britannica.com/dictionary/pipeline) definition of a |
| 1351 |
// pipeline where a **pipeline** is the system for developing and producing |
| 1352 |
// something. In the context of CI/CD, a pipeline produces or delivers |
| 1353 |
// software. |
| 1354 |
const ( |
| 1355 |
// CICDPipelineNameKey is the attribute Key conforming to the |
| 1356 |
// "cicd.pipeline.name" semantic conventions. It represents the human |
| 1357 |
// readable name of the pipeline within a CI/CD system. |
| 1358 |
// |
| 1359 |
// Type: string |
| 1360 |
// RequirementLevel: Optional |
| 1361 |
// Stability: experimental |
| 1362 |
// Examples: 'Build and Test', 'Lint', 'Deploy Go Project', |
| 1363 |
// 'deploy_to_environment' |
| 1364 |
CICDPipelineNameKey = attribute.Key("cicd.pipeline.name") |
| 1365 |
|
| 1366 |
// CICDPipelineRunIDKey is the attribute Key conforming to the |
| 1367 |
// "cicd.pipeline.run.id" semantic conventions. It represents the unique |
| 1368 |
// identifier of a pipeline run within a CI/CD system. |
| 1369 |
// |
| 1370 |
// Type: string |
| 1371 |
// RequirementLevel: Optional |
| 1372 |
// Stability: experimental |
| 1373 |
// Examples: '120912' |
| 1374 |
CICDPipelineRunIDKey = attribute.Key("cicd.pipeline.run.id") |
| 1375 |
|
| 1376 |
// CICDPipelineTaskNameKey is the attribute Key conforming to the |
| 1377 |
// "cicd.pipeline.task.name" semantic conventions. It represents the human |
| 1378 |
// readable name of a task within a pipeline. Task here most closely aligns |
| 1379 |
// with a [computing |
| 1380 |
// process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a |
| 1381 |
// pipeline. Other terms for tasks include commands, steps, and procedures. |
| 1382 |
// |
| 1383 |
// Type: string |
| 1384 |
// RequirementLevel: Optional |
| 1385 |
// Stability: experimental |
| 1386 |
// Examples: 'Run GoLang Linter', 'Go Build', 'go-test', 'deploy_binary' |
| 1387 |
CICDPipelineTaskNameKey = attribute.Key("cicd.pipeline.task.name") |
| 1388 |
|
| 1389 |
// CICDPipelineTaskRunIDKey is the attribute Key conforming to the |
| 1390 |
// "cicd.pipeline.task.run.id" semantic conventions. It represents the |
| 1391 |
// unique identifier of a task run within a pipeline. |
| 1392 |
// |
| 1393 |
// Type: string |
| 1394 |
// RequirementLevel: Optional |
| 1395 |
// Stability: experimental |
| 1396 |
// Examples: '12097' |
| 1397 |
CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id") |
| 1398 |
|
| 1399 |
// CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the |
| 1400 |
// "cicd.pipeline.task.run.url.full" semantic conventions. It represents |
| 1401 |
// the [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run |
| 1402 |
// providing the complete address in order to locate and identify the |
| 1403 |
// pipeline run. |
| 1404 |
// |
| 1405 |
// Type: string |
| 1406 |
// RequirementLevel: Optional |
| 1407 |
// Stability: experimental |
| 1408 |
// Examples: |
| 1409 |
// 'https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075' |
| 1410 |
CICDPipelineTaskRunURLFullKey = attribute.Key("cicd.pipeline.task.run.url.full") |
| 1411 |
|
| 1412 |
// CICDPipelineTaskTypeKey is the attribute Key conforming to the |
| 1413 |
// "cicd.pipeline.task.type" semantic conventions. It represents the type |
| 1414 |
// of the task within a pipeline. |
| 1415 |
// |
| 1416 |
// Type: Enum |
| 1417 |
// RequirementLevel: Optional |
| 1418 |
// Stability: experimental |
| 1419 |
// Examples: 'build', 'test', 'deploy' |
| 1420 |
CICDPipelineTaskTypeKey = attribute.Key("cicd.pipeline.task.type") |
| 1421 |
) |
| 1422 |
|
| 1423 |
var ( |
| 1424 |
// build |
| 1425 |
CICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String("build") |
| 1426 |
// test |
| 1427 |
CICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String("test") |
| 1428 |
// deploy |
| 1429 |
CICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String("deploy") |
| 1430 |
) |
| 1431 |
|
| 1432 |
// CICDPipelineName returns an attribute KeyValue conforming to the |
| 1433 |
// "cicd.pipeline.name" semantic conventions. It represents the human readable |
| 1434 |
// name of the pipeline within a CI/CD system. |
| 1435 |
func CICDPipelineName(val string) attribute.KeyValue { |
| 1436 |
return CICDPipelineNameKey.String(val) |
| 1437 |
} |
| 1438 |
|
| 1439 |
// CICDPipelineRunID returns an attribute KeyValue conforming to the |
| 1440 |
// "cicd.pipeline.run.id" semantic conventions. It represents the unique |
| 1441 |
// identifier of a pipeline run within a CI/CD system. |
| 1442 |
func CICDPipelineRunID(val string) attribute.KeyValue { |
| 1443 |
return CICDPipelineRunIDKey.String(val) |
| 1444 |
} |
| 1445 |
|
| 1446 |
// CICDPipelineTaskName returns an attribute KeyValue conforming to the |
| 1447 |
// "cicd.pipeline.task.name" semantic conventions. It represents the human |
| 1448 |
// readable name of a task within a pipeline. Task here most closely aligns |
| 1449 |
// with a [computing |
| 1450 |
// process](https://en.wikipedia.org/wiki/Pipeline_(computing)) in a pipeline. |
| 1451 |
// Other terms for tasks include commands, steps, and procedures. |
| 1452 |
func CICDPipelineTaskName(val string) attribute.KeyValue { |
| 1453 |
return CICDPipelineTaskNameKey.String(val) |
| 1454 |
} |
| 1455 |
|
| 1456 |
// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the |
| 1457 |
// "cicd.pipeline.task.run.id" semantic conventions. It represents the unique |
| 1458 |
// identifier of a task run within a pipeline. |
| 1459 |
func CICDPipelineTaskRunID(val string) attribute.KeyValue { |
| 1460 |
return CICDPipelineTaskRunIDKey.String(val) |
| 1461 |
} |
| 1462 |
|
| 1463 |
// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to |
| 1464 |
// the "cicd.pipeline.task.run.url.full" semantic conventions. It represents |
| 1465 |
// the [URL](https://en.wikipedia.org/wiki/URL) of the pipeline run providing |
| 1466 |
// the complete address in order to locate and identify the pipeline run. |
| 1467 |
func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue { |
| 1468 |
return CICDPipelineTaskRunURLFullKey.String(val) |
| 1469 |
} |
| 1470 |
|
| 1471 |
// These attributes may be used to describe the client in a connection-based |
| 1472 |
// network interaction where there is one side that initiates the connection |
| 1473 |
// (the client is the side that initiates the connection). This covers all TCP |
| 1474 |
// network interactions since TCP is connection-based and one side initiates |
| 1475 |
// the connection (an exception is made for peer-to-peer communication over TCP |
| 1476 |
// where the "user-facing" surface of the protocol / API doesn't expose a clear |
| 1477 |
// notion of client and server). This also covers UDP network interactions |
| 1478 |
// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. |
| 1479 |
const ( |
| 1480 |
// ClientAddressKey is the attribute Key conforming to the "client.address" |
| 1481 |
// semantic conventions. It represents the client address - domain name if |
| 1482 |
// available without reverse DNS lookup; otherwise, IP address or Unix |
| 1483 |
// domain socket name. |
| 1484 |
// |
| 1485 |
// Type: string |
| 1486 |
// RequirementLevel: Optional |
| 1487 |
// Stability: stable |
| 1488 |
// Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' |
| 1489 |
// Note: When observed from the server side, and when communicating through |
| 1490 |
// an intermediary, `client.address` SHOULD represent the client address |
| 1491 |
// behind any intermediaries, for example proxies, if it's available. |
| 1492 |
ClientAddressKey = attribute.Key("client.address") |
| 1493 |
|
| 1494 |
// ClientPortKey is the attribute Key conforming to the "client.port" |
| 1495 |
// semantic conventions. It represents the client port number. |
| 1496 |
// |
| 1497 |
// Type: int |
| 1498 |
// RequirementLevel: Optional |
| 1499 |
// Stability: stable |
| 1500 |
// Examples: 65123 |
| 1501 |
// Note: When observed from the server side, and when communicating through |
| 1502 |
// an intermediary, `client.port` SHOULD represent the client port behind |
| 1503 |
// any intermediaries, for example proxies, if it's available. |
| 1504 |
ClientPortKey = attribute.Key("client.port") |
| 1505 |
) |
| 1506 |
|
| 1507 |
// ClientAddress returns an attribute KeyValue conforming to the |
| 1508 |
// "client.address" semantic conventions. It represents the client address - |
| 1509 |
// domain name if available without reverse DNS lookup; otherwise, IP address |
| 1510 |
// or Unix domain socket name. |
| 1511 |
func ClientAddress(val string) attribute.KeyValue { |
| 1512 |
return ClientAddressKey.String(val) |
| 1513 |
} |
| 1514 |
|
| 1515 |
// ClientPort returns an attribute KeyValue conforming to the "client.port" |
| 1516 |
// semantic conventions. It represents the client port number. |
| 1517 |
func ClientPort(val int) attribute.KeyValue { |
| 1518 |
return ClientPortKey.Int(val) |
| 1519 |
} |
| 1520 |
|
| 1521 |
// A cloud environment (e.g. GCP, Azure, AWS). |
| 1522 |
const ( |
| 1523 |
// CloudAccountIDKey is the attribute Key conforming to the |
| 1524 |
// "cloud.account.id" semantic conventions. It represents the cloud account |
| 1525 |
// ID the resource is assigned to. |
| 1526 |
// |
| 1527 |
// Type: string |
| 1528 |
// RequirementLevel: Optional |
| 1529 |
// Stability: experimental |
| 1530 |
// Examples: '111111111111', 'opentelemetry' |
| 1531 |
CloudAccountIDKey = attribute.Key("cloud.account.id") |
| 1532 |
|
| 1533 |
// CloudAvailabilityZoneKey is the attribute Key conforming to the |
| 1534 |
// "cloud.availability_zone" semantic conventions. It represents the cloud |
| 1535 |
// regions often have multiple, isolated locations known as zones to |
| 1536 |
// increase availability. Availability zone represents the zone where the |
| 1537 |
// resource is running. |
| 1538 |
// |
| 1539 |
// Type: string |
| 1540 |
// RequirementLevel: Optional |
| 1541 |
// Stability: experimental |
| 1542 |
// Examples: 'us-east-1c' |
| 1543 |
// Note: Availability zones are called "zones" on Alibaba Cloud and Google |
| 1544 |
// Cloud. |
| 1545 |
CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") |
| 1546 |
|
| 1547 |
// CloudPlatformKey is the attribute Key conforming to the "cloud.platform" |
| 1548 |
// semantic conventions. It represents the cloud platform in use. |
| 1549 |
// |
| 1550 |
// Type: Enum |
| 1551 |
// RequirementLevel: Optional |
| 1552 |
// Stability: experimental |
| 1553 |
// Note: The prefix of the service SHOULD match the one specified in |
| 1554 |
// `cloud.provider`. |
| 1555 |
CloudPlatformKey = attribute.Key("cloud.platform") |
| 1556 |
|
| 1557 |
// CloudProviderKey is the attribute Key conforming to the "cloud.provider" |
| 1558 |
// semantic conventions. It represents the name of the cloud provider. |
| 1559 |
// |
| 1560 |
// Type: Enum |
| 1561 |
// RequirementLevel: Optional |
| 1562 |
// Stability: experimental |
| 1563 |
CloudProviderKey = attribute.Key("cloud.provider") |
| 1564 |
|
| 1565 |
// CloudRegionKey is the attribute Key conforming to the "cloud.region" |
| 1566 |
// semantic conventions. It represents the geographical region the resource |
| 1567 |
// is running. |
| 1568 |
// |
| 1569 |
// Type: string |
| 1570 |
// RequirementLevel: Optional |
| 1571 |
// Stability: experimental |
| 1572 |
// Examples: 'us-central1', 'us-east-1' |
| 1573 |
// Note: Refer to your provider's docs to see the available regions, for |
| 1574 |
// example [Alibaba Cloud |
| 1575 |
// regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS |
| 1576 |
// regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), |
| 1577 |
// [Azure |
| 1578 |
// regions](https://azure.microsoft.com/global-infrastructure/geographies/), |
| 1579 |
// [Google Cloud regions](https://cloud.google.com/about/locations), or |
| 1580 |
// [Tencent Cloud |
| 1581 |
// regions](https://www.tencentcloud.com/document/product/213/6091). |
| 1582 |
CloudRegionKey = attribute.Key("cloud.region") |
| 1583 |
|
| 1584 |
// CloudResourceIDKey is the attribute Key conforming to the |
| 1585 |
// "cloud.resource_id" semantic conventions. It represents the cloud |
| 1586 |
// provider-specific native identifier of the monitored cloud resource |
| 1587 |
// (e.g. an |
| 1588 |
// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) |
| 1589 |
// on AWS, a [fully qualified resource |
| 1590 |
// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) |
| 1591 |
// on Azure, a [full resource |
| 1592 |
// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) |
| 1593 |
// on GCP) |
| 1594 |
// |
| 1595 |
// Type: string |
| 1596 |
// RequirementLevel: Optional |
| 1597 |
// Stability: experimental |
| 1598 |
// Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', |
| 1599 |
// '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', |
| 1600 |
// '/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>' |
| 1601 |
// Note: On some cloud providers, it may not be possible to determine the |
| 1602 |
// full ID at startup, |
| 1603 |
// so it may be necessary to set `cloud.resource_id` as a span attribute |
| 1604 |
// instead. |
| 1605 |
// |
| 1606 |
// The exact value to use for `cloud.resource_id` depends on the cloud |
| 1607 |
// provider. |
| 1608 |
// The following well-known definitions MUST be used if you set this |
| 1609 |
// attribute and they apply: |
| 1610 |
// |
| 1611 |
// * **AWS Lambda:** The function |
| 1612 |
// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). |
| 1613 |
// Take care not to use the "invoked ARN" directly but replace any |
| 1614 |
// [alias |
| 1615 |
// suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) |
| 1616 |
// with the resolved function version, as the same runtime instance may |
| 1617 |
// be invocable with |
| 1618 |
// multiple different aliases. |
| 1619 |
// * **GCP:** The [URI of the |
| 1620 |
// resource](https://cloud.google.com/iam/docs/full-resource-names) |
| 1621 |
// * **Azure:** The [Fully Qualified Resource |
| 1622 |
// ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) |
| 1623 |
// of the invoked function, |
| 1624 |
// *not* the function app, having the form |
| 1625 |
// `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>`. |
| 1626 |
// This means that a span attribute MUST be used, as an Azure function |
| 1627 |
// app can host multiple functions that would usually share |
| 1628 |
// a TracerProvider. |
| 1629 |
CloudResourceIDKey = attribute.Key("cloud.resource_id") |
| 1630 |
) |
| 1631 |
|
| 1632 |
var ( |
| 1633 |
// Alibaba Cloud Elastic Compute Service |
| 1634 |
CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") |
| 1635 |
// Alibaba Cloud Function Compute |
| 1636 |
CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") |
| 1637 |
// Red Hat OpenShift on Alibaba Cloud |
| 1638 |
CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") |
| 1639 |
// AWS Elastic Compute Cloud |
| 1640 |
CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") |
| 1641 |
// AWS Elastic Container Service |
| 1642 |
CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") |
| 1643 |
// AWS Elastic Kubernetes Service |
| 1644 |
CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") |
| 1645 |
// AWS Lambda |
| 1646 |
CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") |
| 1647 |
// AWS Elastic Beanstalk |
| 1648 |
CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") |
| 1649 |
// AWS App Runner |
| 1650 |
CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") |
| 1651 |
// Red Hat OpenShift on AWS (ROSA) |
| 1652 |
CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") |
| 1653 |
// Azure Virtual Machines |
| 1654 |
CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") |
| 1655 |
// Azure Container Apps |
| 1656 |
CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps") |
| 1657 |
// Azure Container Instances |
| 1658 |
CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") |
| 1659 |
// Azure Kubernetes Service |
| 1660 |
CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") |
| 1661 |
// Azure Functions |
| 1662 |
CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") |
| 1663 |
// Azure App Service |
| 1664 |
CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") |
| 1665 |
// Azure Red Hat OpenShift |
| 1666 |
CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") |
| 1667 |
// Google Bare Metal Solution (BMS) |
| 1668 |
CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") |
| 1669 |
// Google Cloud Compute Engine (GCE) |
| 1670 |
CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") |
| 1671 |
// Google Cloud Run |
| 1672 |
CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") |
| 1673 |
// Google Cloud Kubernetes Engine (GKE) |
| 1674 |
CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") |
| 1675 |
// Google Cloud Functions (GCF) |
| 1676 |
CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") |
| 1677 |
// Google Cloud App Engine (GAE) |
| 1678 |
CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") |
| 1679 |
// Red Hat OpenShift on Google Cloud |
| 1680 |
CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") |
| 1681 |
// Red Hat OpenShift on IBM Cloud |
| 1682 |
CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") |
| 1683 |
// Tencent Cloud Cloud Virtual Machine (CVM) |
| 1684 |
CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") |
| 1685 |
// Tencent Cloud Elastic Kubernetes Service (EKS) |
| 1686 |
CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") |
| 1687 |
// Tencent Cloud Serverless Cloud Function (SCF) |
| 1688 |
CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") |
| 1689 |
) |
| 1690 |
|
| 1691 |
var ( |
| 1692 |
// Alibaba Cloud |
| 1693 |
CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") |
| 1694 |
// Amazon Web Services |
| 1695 |
CloudProviderAWS = CloudProviderKey.String("aws") |
| 1696 |
// Microsoft Azure |
| 1697 |
CloudProviderAzure = CloudProviderKey.String("azure") |
| 1698 |
// Google Cloud Platform |
| 1699 |
CloudProviderGCP = CloudProviderKey.String("gcp") |
| 1700 |
// Heroku Platform as a Service |
| 1701 |
CloudProviderHeroku = CloudProviderKey.String("heroku") |
| 1702 |
// IBM Cloud |
| 1703 |
CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") |
| 1704 |
// Tencent Cloud |
| 1705 |
CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") |
| 1706 |
) |
| 1707 |
|
| 1708 |
// CloudAccountID returns an attribute KeyValue conforming to the |
| 1709 |
// "cloud.account.id" semantic conventions. It represents the cloud account ID |
| 1710 |
// the resource is assigned to. |
| 1711 |
func CloudAccountID(val string) attribute.KeyValue { |
| 1712 |
return CloudAccountIDKey.String(val) |
| 1713 |
} |
| 1714 |
|
| 1715 |
// CloudAvailabilityZone returns an attribute KeyValue conforming to the |
| 1716 |
// "cloud.availability_zone" semantic conventions. It represents the cloud |
| 1717 |
// regions often have multiple, isolated locations known as zones to increase |
| 1718 |
// availability. Availability zone represents the zone where the resource is |
| 1719 |
// running. |
| 1720 |
func CloudAvailabilityZone(val string) attribute.KeyValue { |
| 1721 |
return CloudAvailabilityZoneKey.String(val) |
| 1722 |
} |
| 1723 |
|
| 1724 |
// CloudRegion returns an attribute KeyValue conforming to the |
| 1725 |
// "cloud.region" semantic conventions. It represents the geographical region |
| 1726 |
// the resource is running. |
| 1727 |
func CloudRegion(val string) attribute.KeyValue { |
| 1728 |
return CloudRegionKey.String(val) |
| 1729 |
} |
| 1730 |
|
| 1731 |
// CloudResourceID returns an attribute KeyValue conforming to the |
| 1732 |
// "cloud.resource_id" semantic conventions. It represents the cloud |
| 1733 |
// provider-specific native identifier of the monitored cloud resource (e.g. an |
| 1734 |
// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) |
| 1735 |
// on AWS, a [fully qualified resource |
| 1736 |
// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on |
| 1737 |
// Azure, a [full resource |
| 1738 |
// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) |
| 1739 |
// on GCP) |
| 1740 |
func CloudResourceID(val string) attribute.KeyValue { |
| 1741 |
return CloudResourceIDKey.String(val) |
| 1742 |
} |
| 1743 |
|
| 1744 |
// Attributes for CloudEvents. |
| 1745 |
const ( |
| 1746 |
// CloudeventsEventIDKey is the attribute Key conforming to the |
| 1747 |
// "cloudevents.event_id" semantic conventions. It represents the |
| 1748 |
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) |
| 1749 |
// uniquely identifies the event. |
| 1750 |
// |
| 1751 |
// Type: string |
| 1752 |
// RequirementLevel: Optional |
| 1753 |
// Stability: experimental |
| 1754 |
// Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' |
| 1755 |
CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") |
| 1756 |
|
| 1757 |
// CloudeventsEventSourceKey is the attribute Key conforming to the |
| 1758 |
// "cloudevents.event_source" semantic conventions. It represents the |
| 1759 |
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) |
| 1760 |
// identifies the context in which an event happened. |
| 1761 |
// |
| 1762 |
// Type: string |
| 1763 |
// RequirementLevel: Optional |
| 1764 |
// Stability: experimental |
| 1765 |
// Examples: 'https://github.com/cloudevents', |
| 1766 |
// '/cloudevents/spec/pull/123', 'my-service' |
| 1767 |
CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") |
| 1768 |
|
| 1769 |
// CloudeventsEventSpecVersionKey is the attribute Key conforming to the |
| 1770 |
// "cloudevents.event_spec_version" semantic conventions. It represents the |
| 1771 |
// [version of the CloudEvents |
| 1772 |
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) |
| 1773 |
// which the event uses. |
| 1774 |
// |
| 1775 |
// Type: string |
| 1776 |
// RequirementLevel: Optional |
| 1777 |
// Stability: experimental |
| 1778 |
// Examples: '1.0' |
| 1779 |
CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") |
| 1780 |
|
| 1781 |
// CloudeventsEventSubjectKey is the attribute Key conforming to the |
| 1782 |
// "cloudevents.event_subject" semantic conventions. It represents the |
| 1783 |
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) |
| 1784 |
// of the event in the context of the event producer (identified by |
| 1785 |
// source). |
| 1786 |
// |
| 1787 |
// Type: string |
| 1788 |
// RequirementLevel: Optional |
| 1789 |
// Stability: experimental |
| 1790 |
// Examples: 'mynewfile.jpg' |
| 1791 |
CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") |
| 1792 |
|
| 1793 |
// CloudeventsEventTypeKey is the attribute Key conforming to the |
| 1794 |
// "cloudevents.event_type" semantic conventions. It represents the |
| 1795 |
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) |
| 1796 |
// contains a value describing the type of event related to the originating |
| 1797 |
// occurrence. |
| 1798 |
// |
| 1799 |
// Type: string |
| 1800 |
// RequirementLevel: Optional |
| 1801 |
// Stability: experimental |
| 1802 |
// Examples: 'com.github.pull_request.opened', |
| 1803 |
// 'com.example.object.deleted.v2' |
| 1804 |
CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") |
| 1805 |
) |
| 1806 |
|
| 1807 |
// CloudeventsEventID returns an attribute KeyValue conforming to the |
| 1808 |
// "cloudevents.event_id" semantic conventions. It represents the |
| 1809 |
// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) |
| 1810 |
// uniquely identifies the event. |
| 1811 |
func CloudeventsEventID(val string) attribute.KeyValue { |
| 1812 |
return CloudeventsEventIDKey.String(val) |
| 1813 |
} |
| 1814 |
|
| 1815 |
// CloudeventsEventSource returns an attribute KeyValue conforming to the |
| 1816 |
// "cloudevents.event_source" semantic conventions. It represents the |
| 1817 |
// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) |
| 1818 |
// identifies the context in which an event happened. |
| 1819 |
func CloudeventsEventSource(val string) attribute.KeyValue { |
| 1820 |
return CloudeventsEventSourceKey.String(val) |
| 1821 |
} |
| 1822 |
|
| 1823 |
// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to |
| 1824 |
// the "cloudevents.event_spec_version" semantic conventions. It represents the |
| 1825 |
// [version of the CloudEvents |
| 1826 |
// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) |
| 1827 |
// which the event uses. |
| 1828 |
func CloudeventsEventSpecVersion(val string) attribute.KeyValue { |
| 1829 |
return CloudeventsEventSpecVersionKey.String(val) |
| 1830 |
} |
| 1831 |
|
| 1832 |
// CloudeventsEventSubject returns an attribute KeyValue conforming to the |
| 1833 |
// "cloudevents.event_subject" semantic conventions. It represents the |
| 1834 |
// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) |
| 1835 |
// of the event in the context of the event producer (identified by source). |
| 1836 |
func CloudeventsEventSubject(val string) attribute.KeyValue { |
| 1837 |
return CloudeventsEventSubjectKey.String(val) |
| 1838 |
} |
| 1839 |
|
| 1840 |
// CloudeventsEventType returns an attribute KeyValue conforming to the |
| 1841 |
// "cloudevents.event_type" semantic conventions. It represents the |
| 1842 |
// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) |
| 1843 |
// contains a value describing the type of event related to the originating |
| 1844 |
// occurrence. |
| 1845 |
func CloudeventsEventType(val string) attribute.KeyValue { |
| 1846 |
return CloudeventsEventTypeKey.String(val) |
| 1847 |
} |
| 1848 |
|
| 1849 |
// These attributes allow to report this unit of code and therefore to provide |
| 1850 |
// more context about the span. |
| 1851 |
const ( |
| 1852 |
// CodeColumnKey is the attribute Key conforming to the "code.column" |
| 1853 |
// semantic conventions. It represents the column number in `code.filepath` |
| 1854 |
// best representing the operation. It SHOULD point within the code unit |
| 1855 |
// named in `code.function`. |
| 1856 |
// |
| 1857 |
// Type: int |
| 1858 |
// RequirementLevel: Optional |
| 1859 |
// Stability: experimental |
| 1860 |
// Examples: 16 |
| 1861 |
CodeColumnKey = attribute.Key("code.column") |
| 1862 |
|
| 1863 |
// CodeFilepathKey is the attribute Key conforming to the "code.filepath" |
| 1864 |
// semantic conventions. It represents the source code file name that |
| 1865 |
// identifies the code unit as uniquely as possible (preferably an absolute |
| 1866 |
// file path). |
| 1867 |
// |
| 1868 |
// Type: string |
| 1869 |
// RequirementLevel: Optional |
| 1870 |
// Stability: experimental |
| 1871 |
// Examples: '/usr/local/MyApplication/content_root/app/index.php' |
| 1872 |
CodeFilepathKey = attribute.Key("code.filepath") |
| 1873 |
|
| 1874 |
// CodeFunctionKey is the attribute Key conforming to the "code.function" |
| 1875 |
// semantic conventions. It represents the method or function name, or |
| 1876 |
// equivalent (usually rightmost part of the code unit's name). |
| 1877 |
// |
| 1878 |
// Type: string |
| 1879 |
// RequirementLevel: Optional |
| 1880 |
// Stability: experimental |
| 1881 |
// Examples: 'serveRequest' |
| 1882 |
CodeFunctionKey = attribute.Key("code.function") |
| 1883 |
|
| 1884 |
// CodeLineNumberKey is the attribute Key conforming to the "code.lineno" |
| 1885 |
// semantic conventions. It represents the line number in `code.filepath` |
| 1886 |
// best representing the operation. It SHOULD point within the code unit |
| 1887 |
// named in `code.function`. |
| 1888 |
// |
| 1889 |
// Type: int |
| 1890 |
// RequirementLevel: Optional |
| 1891 |
// Stability: experimental |
| 1892 |
// Examples: 42 |
| 1893 |
CodeLineNumberKey = attribute.Key("code.lineno") |
| 1894 |
|
| 1895 |
// CodeNamespaceKey is the attribute Key conforming to the "code.namespace" |
| 1896 |
// semantic conventions. It represents the "namespace" within which |
| 1897 |
// `code.function` is defined. Usually the qualified class or module name, |
| 1898 |
// such that `code.namespace` + some separator + `code.function` form a |
| 1899 |
// unique identifier for the code unit. |
| 1900 |
// |
| 1901 |
// Type: string |
| 1902 |
// RequirementLevel: Optional |
| 1903 |
// Stability: experimental |
| 1904 |
// Examples: 'com.example.MyHTTPService' |
| 1905 |
CodeNamespaceKey = attribute.Key("code.namespace") |
| 1906 |
|
| 1907 |
// CodeStacktraceKey is the attribute Key conforming to the |
| 1908 |
// "code.stacktrace" semantic conventions. It represents a stacktrace as a |
| 1909 |
// string in the natural representation for the language runtime. The |
| 1910 |
// representation is to be determined and documented by each language SIG. |
| 1911 |
// |
| 1912 |
// Type: string |
| 1913 |
// RequirementLevel: Optional |
| 1914 |
// Stability: experimental |
| 1915 |
// Examples: 'at |
| 1916 |
// com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' |
| 1917 |
// 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' |
| 1918 |
// 'com.example.GenerateTrace.main(GenerateTrace.java:5)' |
| 1919 |
CodeStacktraceKey = attribute.Key("code.stacktrace") |
| 1920 |
) |
| 1921 |
|
| 1922 |
// CodeColumn returns an attribute KeyValue conforming to the "code.column" |
| 1923 |
// semantic conventions. It represents the column number in `code.filepath` |
| 1924 |
// best representing the operation. It SHOULD point within the code unit named |
| 1925 |
// in `code.function`. |
| 1926 |
func CodeColumn(val int) attribute.KeyValue { |
| 1927 |
return CodeColumnKey.Int(val) |
| 1928 |
} |
| 1929 |
|
| 1930 |
// CodeFilepath returns an attribute KeyValue conforming to the |
| 1931 |
// "code.filepath" semantic conventions. It represents the source code file |
| 1932 |
// name that identifies the code unit as uniquely as possible (preferably an |
| 1933 |
// absolute file path). |
| 1934 |
func CodeFilepath(val string) attribute.KeyValue { |
| 1935 |
return CodeFilepathKey.String(val) |
| 1936 |
} |
| 1937 |
|
| 1938 |
// CodeFunction returns an attribute KeyValue conforming to the |
| 1939 |
// "code.function" semantic conventions. It represents the method or function |
| 1940 |
// name, or equivalent (usually rightmost part of the code unit's name). |
| 1941 |
func CodeFunction(val string) attribute.KeyValue { |
| 1942 |
return CodeFunctionKey.String(val) |
| 1943 |
} |
| 1944 |
|
| 1945 |
// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" |
| 1946 |
// semantic conventions. It represents the line number in `code.filepath` best |
| 1947 |
// representing the operation. It SHOULD point within the code unit named in |
| 1948 |
// `code.function`. |
| 1949 |
func CodeLineNumber(val int) attribute.KeyValue { |
| 1950 |
return CodeLineNumberKey.Int(val) |
| 1951 |
} |
| 1952 |
|
| 1953 |
// CodeNamespace returns an attribute KeyValue conforming to the |
| 1954 |
// "code.namespace" semantic conventions. It represents the "namespace" within |
| 1955 |
// which `code.function` is defined. Usually the qualified class or module |
| 1956 |
// name, such that `code.namespace` + some separator + `code.function` form a |
| 1957 |
// unique identifier for the code unit. |
| 1958 |
func CodeNamespace(val string) attribute.KeyValue { |
| 1959 |
return CodeNamespaceKey.String(val) |
| 1960 |
} |
| 1961 |
|
| 1962 |
// CodeStacktrace returns an attribute KeyValue conforming to the |
| 1963 |
// "code.stacktrace" semantic conventions. It represents a stacktrace as a |
| 1964 |
// string in the natural representation for the language runtime. The |
| 1965 |
// representation is to be determined and documented by each language SIG. |
| 1966 |
func CodeStacktrace(val string) attribute.KeyValue { |
| 1967 |
return CodeStacktraceKey.String(val) |
| 1968 |
} |
| 1969 |
|
| 1970 |
// A container instance. |
| 1971 |
const ( |
| 1972 |
// ContainerCommandKey is the attribute Key conforming to the |
| 1973 |
// "container.command" semantic conventions. It represents the command used |
| 1974 |
// to run the container (i.e. the command name). |
| 1975 |
// |
| 1976 |
// Type: string |
| 1977 |
// RequirementLevel: Optional |
| 1978 |
// Stability: experimental |
| 1979 |
// Examples: 'otelcontribcol' |
| 1980 |
// Note: If using embedded credentials or sensitive data, it is recommended |
| 1981 |
// to remove them to prevent potential leakage. |
| 1982 |
ContainerCommandKey = attribute.Key("container.command") |
| 1983 |
|
| 1984 |
// ContainerCommandArgsKey is the attribute Key conforming to the |
| 1985 |
// "container.command_args" semantic conventions. It represents the all the |
| 1986 |
// command arguments (including the command/executable itself) run by the |
| 1987 |
// container. [2] |
| 1988 |
// |
| 1989 |
// Type: string[] |
| 1990 |
// RequirementLevel: Optional |
| 1991 |
// Stability: experimental |
| 1992 |
// Examples: 'otelcontribcol, --config, config.yaml' |
| 1993 |
ContainerCommandArgsKey = attribute.Key("container.command_args") |
| 1994 |
|
| 1995 |
// ContainerCommandLineKey is the attribute Key conforming to the |
| 1996 |
// "container.command_line" semantic conventions. It represents the full |
| 1997 |
// command run by the container as a single string representing the full |
| 1998 |
// command. [2] |
| 1999 |
// |
| 2000 |
// Type: string |
| 2001 |
// RequirementLevel: Optional |
| 2002 |
// Stability: experimental |
| 2003 |
// Examples: 'otelcontribcol --config config.yaml' |
| 2004 |
ContainerCommandLineKey = attribute.Key("container.command_line") |
| 2005 |
|
| 2006 |
// ContainerIDKey is the attribute Key conforming to the "container.id" |
| 2007 |
// semantic conventions. It represents the container ID. Usually a UUID, as |
| 2008 |
// for example used to [identify Docker |
| 2009 |
// containers](https://docs.docker.com/engine/reference/run/#container-identification). |
| 2010 |
// The UUID might be abbreviated. |
| 2011 |
// |
| 2012 |
// Type: string |
| 2013 |
// RequirementLevel: Optional |
| 2014 |
// Stability: experimental |
| 2015 |
// Examples: 'a3bf90e006b2' |
| 2016 |
ContainerIDKey = attribute.Key("container.id") |
| 2017 |
|
| 2018 |
// ContainerImageIDKey is the attribute Key conforming to the |
| 2019 |
// "container.image.id" semantic conventions. It represents the runtime |
| 2020 |
// specific image identifier. Usually a hash algorithm followed by a UUID. |
| 2021 |
// |
| 2022 |
// Type: string |
| 2023 |
// RequirementLevel: Optional |
| 2024 |
// Stability: experimental |
| 2025 |
// Examples: |
| 2026 |
// 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' |
| 2027 |
// Note: Docker defines a sha256 of the image id; `container.image.id` |
| 2028 |
// corresponds to the `Image` field from the Docker container inspect |
| 2029 |
// [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) |
| 2030 |
// endpoint. |
| 2031 |
// K8S defines a link to the container registry repository with digest |
| 2032 |
// `"imageID": "registry.azurecr.io |
| 2033 |
// /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. |
| 2034 |
// The ID is assigned by the container runtime and can vary in different |
| 2035 |
// environments. Consider using `oci.manifest.digest` if it is important to |
| 2036 |
// identify the same image in different environments/runtimes. |
| 2037 |
ContainerImageIDKey = attribute.Key("container.image.id") |
| 2038 |
|
| 2039 |
// ContainerImageNameKey is the attribute Key conforming to the |
| 2040 |
// "container.image.name" semantic conventions. It represents the name of |
| 2041 |
// the image the container was built on. |
| 2042 |
// |
| 2043 |
// Type: string |
| 2044 |
// RequirementLevel: Optional |
| 2045 |
// Stability: experimental |
| 2046 |
// Examples: 'gcr.io/opentelemetry/operator' |
| 2047 |
ContainerImageNameKey = attribute.Key("container.image.name") |
| 2048 |
|
| 2049 |
// ContainerImageRepoDigestsKey is the attribute Key conforming to the |
| 2050 |
// "container.image.repo_digests" semantic conventions. It represents the |
| 2051 |
// repo digests of the container image as provided by the container |
| 2052 |
// runtime. |
| 2053 |
// |
| 2054 |
// Type: string[] |
| 2055 |
// RequirementLevel: Optional |
| 2056 |
// Stability: experimental |
| 2057 |
// Examples: |
| 2058 |
// 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb', |
| 2059 |
// 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' |
| 2060 |
// Note: |
| 2061 |
// [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) |
| 2062 |
// and |
| 2063 |
// [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) |
| 2064 |
// report those under the `RepoDigests` field. |
| 2065 |
ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests") |
| 2066 |
|
| 2067 |
// ContainerImageTagsKey is the attribute Key conforming to the |
| 2068 |
// "container.image.tags" semantic conventions. It represents the container |
| 2069 |
// image tags. An example can be found in [Docker Image |
| 2070 |
// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). |
| 2071 |
// Should be only the `<tag>` section of the full name for example from |
| 2072 |
// `registry.example.com/my-org/my-image:<tag>`. |
| 2073 |
// |
| 2074 |
// Type: string[] |
| 2075 |
// RequirementLevel: Optional |
| 2076 |
// Stability: experimental |
| 2077 |
// Examples: 'v1.27.1', '3.5.7-0' |
| 2078 |
ContainerImageTagsKey = attribute.Key("container.image.tags") |
| 2079 |
|
| 2080 |
// ContainerNameKey is the attribute Key conforming to the "container.name" |
| 2081 |
// semantic conventions. It represents the container name used by container |
| 2082 |
// runtime. |
| 2083 |
// |
| 2084 |
// Type: string |
| 2085 |
// RequirementLevel: Optional |
| 2086 |
// Stability: experimental |
| 2087 |
// Examples: 'opentelemetry-autoconf' |
| 2088 |
ContainerNameKey = attribute.Key("container.name") |
| 2089 |
|
| 2090 |
// ContainerRuntimeKey is the attribute Key conforming to the |
| 2091 |
// "container.runtime" semantic conventions. It represents the container |
| 2092 |
// runtime managing this container. |
| 2093 |
// |
| 2094 |
// Type: string |
| 2095 |
// RequirementLevel: Optional |
| 2096 |
// Stability: experimental |
| 2097 |
// Examples: 'docker', 'containerd', 'rkt' |
| 2098 |
ContainerRuntimeKey = attribute.Key("container.runtime") |
| 2099 |
) |
| 2100 |
|
| 2101 |
// ContainerCommand returns an attribute KeyValue conforming to the |
| 2102 |
// "container.command" semantic conventions. It represents the command used to |
| 2103 |
// run the container (i.e. the command name). |
| 2104 |
func ContainerCommand(val string) attribute.KeyValue { |
| 2105 |
return ContainerCommandKey.String(val) |
| 2106 |
} |
| 2107 |
|
| 2108 |
// ContainerCommandArgs returns an attribute KeyValue conforming to the |
| 2109 |
// "container.command_args" semantic conventions. It represents the all the |
| 2110 |
// command arguments (including the command/executable itself) run by the |
| 2111 |
// container. [2] |
| 2112 |
func ContainerCommandArgs(val ...string) attribute.KeyValue { |
| 2113 |
return ContainerCommandArgsKey.StringSlice(val) |
| 2114 |
} |
| 2115 |
|
| 2116 |
// ContainerCommandLine returns an attribute KeyValue conforming to the |
| 2117 |
// "container.command_line" semantic conventions. It represents the full |
| 2118 |
// command run by the container as a single string representing the full |
| 2119 |
// command. [2] |
| 2120 |
func ContainerCommandLine(val string) attribute.KeyValue { |
| 2121 |
return ContainerCommandLineKey.String(val) |
| 2122 |
} |
| 2123 |
|
| 2124 |
// ContainerID returns an attribute KeyValue conforming to the |
| 2125 |
// "container.id" semantic conventions. It represents the container ID. Usually |
| 2126 |
// a UUID, as for example used to [identify Docker |
| 2127 |
// containers](https://docs.docker.com/engine/reference/run/#container-identification). |
| 2128 |
// The UUID might be abbreviated. |
| 2129 |
func ContainerID(val string) attribute.KeyValue { |
| 2130 |
return ContainerIDKey.String(val) |
| 2131 |
} |
| 2132 |
|
| 2133 |
// ContainerImageID returns an attribute KeyValue conforming to the |
| 2134 |
// "container.image.id" semantic conventions. It represents the runtime |
| 2135 |
// specific image identifier. Usually a hash algorithm followed by a UUID. |
| 2136 |
func ContainerImageID(val string) attribute.KeyValue { |
| 2137 |
return ContainerImageIDKey.String(val) |
| 2138 |
} |
| 2139 |
|
| 2140 |
// ContainerImageName returns an attribute KeyValue conforming to the |
| 2141 |
// "container.image.name" semantic conventions. It represents the name of the |
| 2142 |
// image the container was built on. |
| 2143 |
func ContainerImageName(val string) attribute.KeyValue { |
| 2144 |
return ContainerImageNameKey.String(val) |
| 2145 |
} |
| 2146 |
|
| 2147 |
// ContainerImageRepoDigests returns an attribute KeyValue conforming to the |
| 2148 |
// "container.image.repo_digests" semantic conventions. It represents the repo |
| 2149 |
// digests of the container image as provided by the container runtime. |
| 2150 |
func ContainerImageRepoDigests(val ...string) attribute.KeyValue { |
| 2151 |
return ContainerImageRepoDigestsKey.StringSlice(val) |
| 2152 |
} |
| 2153 |
|
| 2154 |
// ContainerImageTags returns an attribute KeyValue conforming to the |
| 2155 |
// "container.image.tags" semantic conventions. It represents the container |
| 2156 |
// image tags. An example can be found in [Docker Image |
| 2157 |
// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). |
| 2158 |
// Should be only the `<tag>` section of the full name for example from |
| 2159 |
// `registry.example.com/my-org/my-image:<tag>`. |
| 2160 |
func ContainerImageTags(val ...string) attribute.KeyValue { |
| 2161 |
return ContainerImageTagsKey.StringSlice(val) |
| 2162 |
} |
| 2163 |
|
| 2164 |
// ContainerName returns an attribute KeyValue conforming to the |
| 2165 |
// "container.name" semantic conventions. It represents the container name used |
| 2166 |
// by container runtime. |
| 2167 |
func ContainerName(val string) attribute.KeyValue { |
| 2168 |
return ContainerNameKey.String(val) |
| 2169 |
} |
| 2170 |
|
| 2171 |
// ContainerRuntime returns an attribute KeyValue conforming to the |
| 2172 |
// "container.runtime" semantic conventions. It represents the container |
| 2173 |
// runtime managing this container. |
| 2174 |
func ContainerRuntime(val string) attribute.KeyValue { |
| 2175 |
return ContainerRuntimeKey.String(val) |
| 2176 |
} |
| 2177 |
|
| 2178 |
// Attributes specific to a cpu instance. |
| 2179 |
const ( |
| 2180 |
// CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic |
| 2181 |
// conventions. It represents the mode of the CPU |
| 2182 |
// |
| 2183 |
// Type: Enum |
| 2184 |
// RequirementLevel: Optional |
| 2185 |
// Stability: experimental |
| 2186 |
// Examples: 'user', 'system' |
| 2187 |
CPUModeKey = attribute.Key("cpu.mode") |
| 2188 |
) |
| 2189 |
|
| 2190 |
var ( |
| 2191 |
// user |
| 2192 |
CPUModeUser = CPUModeKey.String("user") |
| 2193 |
// system |
| 2194 |
CPUModeSystem = CPUModeKey.String("system") |
| 2195 |
// nice |
| 2196 |
CPUModeNice = CPUModeKey.String("nice") |
| 2197 |
// idle |
| 2198 |
CPUModeIdle = CPUModeKey.String("idle") |
| 2199 |
// iowait |
| 2200 |
CPUModeIowait = CPUModeKey.String("iowait") |
| 2201 |
// interrupt |
| 2202 |
CPUModeInterrupt = CPUModeKey.String("interrupt") |
| 2203 |
// steal |
| 2204 |
CPUModeSteal = CPUModeKey.String("steal") |
| 2205 |
// kernel |
| 2206 |
CPUModeKernel = CPUModeKey.String("kernel") |
| 2207 |
) |
| 2208 |
|
| 2209 |
// This group defines the attributes used to describe telemetry in the context |
| 2210 |
// of databases. |
| 2211 |
const ( |
| 2212 |
// DBClientConnectionPoolNameKey is the attribute Key conforming to the |
| 2213 |
// "db.client.connection.pool.name" semantic conventions. It represents the |
| 2214 |
// name of the connection pool; unique within the instrumented application. |
| 2215 |
// In case the connection pool implementation doesn't provide a name, |
| 2216 |
// instrumentation SHOULD use a combination of parameters that would make |
| 2217 |
// the name unique, for example, combining attributes `server.address`, |
| 2218 |
// `server.port`, and `db.namespace`, formatted as |
| 2219 |
// `server.address:server.port/db.namespace`. Instrumentations that |
| 2220 |
// generate connection pool name following different patterns SHOULD |
| 2221 |
// document it. |
| 2222 |
// |
| 2223 |
// Type: string |
| 2224 |
// RequirementLevel: Optional |
| 2225 |
// Stability: experimental |
| 2226 |
// Examples: 'myDataSource' |
| 2227 |
DBClientConnectionPoolNameKey = attribute.Key("db.client.connection.pool.name") |
| 2228 |
|
| 2229 |
// DBClientConnectionStateKey is the attribute Key conforming to the |
| 2230 |
// "db.client.connection.state" semantic conventions. It represents the |
| 2231 |
// state of a connection in the pool |
| 2232 |
// |
| 2233 |
// Type: Enum |
| 2234 |
// RequirementLevel: Optional |
| 2235 |
// Stability: experimental |
| 2236 |
// Examples: 'idle' |
| 2237 |
DBClientConnectionStateKey = attribute.Key("db.client.connection.state") |
| 2238 |
|
| 2239 |
// DBCollectionNameKey is the attribute Key conforming to the |
| 2240 |
// "db.collection.name" semantic conventions. It represents the name of a |
| 2241 |
// collection (table, container) within the database. |
| 2242 |
// |
| 2243 |
// Type: string |
| 2244 |
// RequirementLevel: Optional |
| 2245 |
// Stability: experimental |
| 2246 |
// Examples: 'public.users', 'customers' |
| 2247 |
// Note: It is RECOMMENDED to capture the value as provided by the |
| 2248 |
// application without attempting to do any case normalization. |
| 2249 |
// If the collection name is parsed from the query text, it SHOULD be the |
| 2250 |
// first collection name found in the query and it SHOULD match the value |
| 2251 |
// provided in the query text including any schema and database name |
| 2252 |
// prefix. |
| 2253 |
// For batch operations, if the individual operations are known to have the |
| 2254 |
// same collection name then that collection name SHOULD be used, otherwise |
| 2255 |
// `db.collection.name` SHOULD NOT be captured. |
| 2256 |
DBCollectionNameKey = attribute.Key("db.collection.name") |
| 2257 |
|
| 2258 |
// DBNamespaceKey is the attribute Key conforming to the "db.namespace" |
| 2259 |
// semantic conventions. It represents the name of the database, fully |
| 2260 |
// qualified within the server address and port. |
| 2261 |
// |
| 2262 |
// Type: string |
| 2263 |
// RequirementLevel: Optional |
| 2264 |
// Stability: experimental |
| 2265 |
// Examples: 'customers', 'test.users' |
| 2266 |
// Note: If a database system has multiple namespace components, they |
| 2267 |
// SHOULD be concatenated (potentially using database system specific |
| 2268 |
// conventions) from most general to most specific namespace component, and |
| 2269 |
// more specific namespaces SHOULD NOT be captured without the more general |
| 2270 |
// namespaces, to ensure that "startswith" queries for the more general |
| 2271 |
// namespaces will be valid. |
| 2272 |
// Semantic conventions for individual database systems SHOULD document |
| 2273 |
// what `db.namespace` means in the context of that system. |
| 2274 |
// It is RECOMMENDED to capture the value as provided by the application |
| 2275 |
// without attempting to do any case normalization. |
| 2276 |
DBNamespaceKey = attribute.Key("db.namespace") |
| 2277 |
|
| 2278 |
// DBOperationBatchSizeKey is the attribute Key conforming to the |
| 2279 |
// "db.operation.batch.size" semantic conventions. It represents the number |
| 2280 |
// of queries included in a [batch |
| 2281 |
// operation](/docs/database/database-spans.md#batch-operations). |
| 2282 |
// |
| 2283 |
// Type: int |
| 2284 |
// RequirementLevel: Optional |
| 2285 |
// Stability: experimental |
| 2286 |
// Examples: 2, 3, 4 |
| 2287 |
// Note: Operations are only considered batches when they contain two or |
| 2288 |
// more operations, and so `db.operation.batch.size` SHOULD never be `1`. |
| 2289 |
DBOperationBatchSizeKey = attribute.Key("db.operation.batch.size") |
| 2290 |
|
| 2291 |
// DBOperationNameKey is the attribute Key conforming to the |
| 2292 |
// "db.operation.name" semantic conventions. It represents the name of the |
| 2293 |
// operation or command being executed. |
| 2294 |
// |
| 2295 |
// Type: string |
| 2296 |
// RequirementLevel: Optional |
| 2297 |
// Stability: experimental |
| 2298 |
// Examples: 'findAndModify', 'HMSET', 'SELECT' |
| 2299 |
// Note: It is RECOMMENDED to capture the value as provided by the |
| 2300 |
// application without attempting to do any case normalization. |
| 2301 |
// If the operation name is parsed from the query text, it SHOULD be the |
| 2302 |
// first operation name found in the query. |
| 2303 |
// For batch operations, if the individual operations are known to have the |
| 2304 |
// same operation name then that operation name SHOULD be used prepended by |
| 2305 |
// `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other |
| 2306 |
// database system specific term if more applicable. |
| 2307 |
DBOperationNameKey = attribute.Key("db.operation.name") |
| 2308 |
|
| 2309 |
// DBQueryTextKey is the attribute Key conforming to the "db.query.text" |
| 2310 |
// semantic conventions. It represents the database query being executed. |
| 2311 |
// |
| 2312 |
// Type: string |
| 2313 |
// RequirementLevel: Optional |
| 2314 |
// Stability: experimental |
| 2315 |
// Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey |
| 2316 |
// "WuValue"' |
| 2317 |
// Note: For sanitization see [Sanitization of |
| 2318 |
// `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext). |
| 2319 |
// For batch operations, if the individual operations are known to have the |
| 2320 |
// same query text then that query text SHOULD be used, otherwise all of |
| 2321 |
// the individual query texts SHOULD be concatenated with separator `; ` or |
| 2322 |
// some other database system specific separator if more applicable. |
| 2323 |
// Even though parameterized query text can potentially have sensitive |
| 2324 |
// data, by using a parameterized query the user is giving a strong signal |
| 2325 |
// that any sensitive data will be passed as parameter values, and the |
| 2326 |
// benefit to observability of capturing the static part of the query text |
| 2327 |
// by default outweighs the risk. |
| 2328 |
DBQueryTextKey = attribute.Key("db.query.text") |
| 2329 |
|
| 2330 |
// DBSystemKey is the attribute Key conforming to the "db.system" semantic |
| 2331 |
// conventions. It represents the database management system (DBMS) product |
| 2332 |
// as identified by the client instrumentation. |
| 2333 |
// |
| 2334 |
// Type: Enum |
| 2335 |
// RequirementLevel: Optional |
| 2336 |
// Stability: experimental |
| 2337 |
// Note: The actual DBMS may differ from the one identified by the client. |
| 2338 |
// For example, when using PostgreSQL client libraries to connect to a |
| 2339 |
// CockroachDB, the `db.system` is set to `postgresql` based on the |
| 2340 |
// instrumentation's best knowledge. |
| 2341 |
DBSystemKey = attribute.Key("db.system") |
| 2342 |
) |
| 2343 |
|
| 2344 |
var ( |
| 2345 |
// idle |
| 2346 |
DBClientConnectionStateIdle = DBClientConnectionStateKey.String("idle") |
| 2347 |
// used |
| 2348 |
DBClientConnectionStateUsed = DBClientConnectionStateKey.String("used") |
| 2349 |
) |
| 2350 |
|
| 2351 |
var ( |
| 2352 |
// Some other SQL database. Fallback only. See notes |
| 2353 |
DBSystemOtherSQL = DBSystemKey.String("other_sql") |
| 2354 |
// Adabas (Adaptable Database System) |
| 2355 |
DBSystemAdabas = DBSystemKey.String("adabas") |
| 2356 |
// Deprecated, use `intersystems_cache` instead |
| 2357 |
DBSystemCache = DBSystemKey.String("cache") |
| 2358 |
// InterSystems Caché |
| 2359 |
DBSystemIntersystemsCache = DBSystemKey.String("intersystems_cache") |
| 2360 |
// Apache Cassandra |
| 2361 |
DBSystemCassandra = DBSystemKey.String("cassandra") |
| 2362 |
// ClickHouse |
| 2363 |
DBSystemClickhouse = DBSystemKey.String("clickhouse") |
| 2364 |
// Deprecated, use `other_sql` instead |
| 2365 |
DBSystemCloudscape = DBSystemKey.String("cloudscape") |
| 2366 |
// CockroachDB |
| 2367 |
DBSystemCockroachdb = DBSystemKey.String("cockroachdb") |
| 2368 |
// Deprecated, no replacement at this time |
| 2369 |
DBSystemColdfusion = DBSystemKey.String("coldfusion") |
| 2370 |
// Microsoft Azure Cosmos DB |
| 2371 |
DBSystemCosmosDB = DBSystemKey.String("cosmosdb") |
| 2372 |
// Couchbase |
| 2373 |
DBSystemCouchbase = DBSystemKey.String("couchbase") |
| 2374 |
// CouchDB |
| 2375 |
DBSystemCouchDB = DBSystemKey.String("couchdb") |
| 2376 |
// IBM DB2 |
| 2377 |
DBSystemDB2 = DBSystemKey.String("db2") |
| 2378 |
// Apache Derby |
| 2379 |
DBSystemDerby = DBSystemKey.String("derby") |
| 2380 |
// Amazon DynamoDB |
| 2381 |
DBSystemDynamoDB = DBSystemKey.String("dynamodb") |
| 2382 |
// EnterpriseDB |
| 2383 |
DBSystemEDB = DBSystemKey.String("edb") |
| 2384 |
// Elasticsearch |
| 2385 |
DBSystemElasticsearch = DBSystemKey.String("elasticsearch") |
| 2386 |
// FileMaker |
| 2387 |
DBSystemFilemaker = DBSystemKey.String("filemaker") |
| 2388 |
// Firebird |
| 2389 |
DBSystemFirebird = DBSystemKey.String("firebird") |
| 2390 |
// Deprecated, use `other_sql` instead |
| 2391 |
DBSystemFirstSQL = DBSystemKey.String("firstsql") |
| 2392 |
// Apache Geode |
| 2393 |
DBSystemGeode = DBSystemKey.String("geode") |
| 2394 |
// H2 |
| 2395 |
DBSystemH2 = DBSystemKey.String("h2") |
| 2396 |
// SAP HANA |
| 2397 |
DBSystemHanaDB = DBSystemKey.String("hanadb") |
| 2398 |
// Apache HBase |
| 2399 |
DBSystemHBase = DBSystemKey.String("hbase") |
| 2400 |
// Apache Hive |
| 2401 |
DBSystemHive = DBSystemKey.String("hive") |
| 2402 |
// HyperSQL DataBase |
| 2403 |
DBSystemHSQLDB = DBSystemKey.String("hsqldb") |
| 2404 |
// InfluxDB |
| 2405 |
DBSystemInfluxdb = DBSystemKey.String("influxdb") |
| 2406 |
// Informix |
| 2407 |
DBSystemInformix = DBSystemKey.String("informix") |
| 2408 |
// Ingres |
| 2409 |
DBSystemIngres = DBSystemKey.String("ingres") |
| 2410 |
// InstantDB |
| 2411 |
DBSystemInstantDB = DBSystemKey.String("instantdb") |
| 2412 |
// InterBase |
| 2413 |
DBSystemInterbase = DBSystemKey.String("interbase") |
| 2414 |
// MariaDB |
| 2415 |
DBSystemMariaDB = DBSystemKey.String("mariadb") |
| 2416 |
// SAP MaxDB |
| 2417 |
DBSystemMaxDB = DBSystemKey.String("maxdb") |
| 2418 |
// Memcached |
| 2419 |
DBSystemMemcached = DBSystemKey.String("memcached") |
| 2420 |
// MongoDB |
| 2421 |
DBSystemMongoDB = DBSystemKey.String("mongodb") |
| 2422 |
// Microsoft SQL Server |
| 2423 |
DBSystemMSSQL = DBSystemKey.String("mssql") |
| 2424 |
// Deprecated, Microsoft SQL Server Compact is discontinued |
| 2425 |
DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") |
| 2426 |
// MySQL |
| 2427 |
DBSystemMySQL = DBSystemKey.String("mysql") |
| 2428 |
// Neo4j |
| 2429 |
DBSystemNeo4j = DBSystemKey.String("neo4j") |
| 2430 |
// Netezza |
| 2431 |
DBSystemNetezza = DBSystemKey.String("netezza") |
| 2432 |
// OpenSearch |
| 2433 |
DBSystemOpensearch = DBSystemKey.String("opensearch") |
| 2434 |
// Oracle Database |
| 2435 |
DBSystemOracle = DBSystemKey.String("oracle") |
| 2436 |
// Pervasive PSQL |
| 2437 |
DBSystemPervasive = DBSystemKey.String("pervasive") |
| 2438 |
// PointBase |
| 2439 |
DBSystemPointbase = DBSystemKey.String("pointbase") |
| 2440 |
// PostgreSQL |
| 2441 |
DBSystemPostgreSQL = DBSystemKey.String("postgresql") |
| 2442 |
// Progress Database |
| 2443 |
DBSystemProgress = DBSystemKey.String("progress") |
| 2444 |
// Redis |
| 2445 |
DBSystemRedis = DBSystemKey.String("redis") |
| 2446 |
// Amazon Redshift |
| 2447 |
DBSystemRedshift = DBSystemKey.String("redshift") |
| 2448 |
// Cloud Spanner |
| 2449 |
DBSystemSpanner = DBSystemKey.String("spanner") |
| 2450 |
// SQLite |
| 2451 |
DBSystemSqlite = DBSystemKey.String("sqlite") |
| 2452 |
// Sybase |
| 2453 |
DBSystemSybase = DBSystemKey.String("sybase") |
| 2454 |
// Teradata |
| 2455 |
DBSystemTeradata = DBSystemKey.String("teradata") |
| 2456 |
// Trino |
| 2457 |
DBSystemTrino = DBSystemKey.String("trino") |
| 2458 |
// Vertica |
| 2459 |
DBSystemVertica = DBSystemKey.String("vertica") |
| 2460 |
) |
| 2461 |
|
| 2462 |
// DBClientConnectionPoolName returns an attribute KeyValue conforming to |
| 2463 |
// the "db.client.connection.pool.name" semantic conventions. It represents the |
| 2464 |
// name of the connection pool; unique within the instrumented application. In |
| 2465 |
// case the connection pool implementation doesn't provide a name, |
| 2466 |
// instrumentation SHOULD use a combination of parameters that would make the |
| 2467 |
// name unique, for example, combining attributes `server.address`, |
| 2468 |
// `server.port`, and `db.namespace`, formatted as |
| 2469 |
// `server.address:server.port/db.namespace`. Instrumentations that generate |
| 2470 |
// connection pool name following different patterns SHOULD document it. |
| 2471 |
func DBClientConnectionPoolName(val string) attribute.KeyValue { |
| 2472 |
return DBClientConnectionPoolNameKey.String(val) |
| 2473 |
} |
| 2474 |
|
| 2475 |
// DBCollectionName returns an attribute KeyValue conforming to the |
| 2476 |
// "db.collection.name" semantic conventions. It represents the name of a |
| 2477 |
// collection (table, container) within the database. |
| 2478 |
func DBCollectionName(val string) attribute.KeyValue { |
| 2479 |
return DBCollectionNameKey.String(val) |
| 2480 |
} |
| 2481 |
|
| 2482 |
// DBNamespace returns an attribute KeyValue conforming to the |
| 2483 |
// "db.namespace" semantic conventions. It represents the name of the database, |
| 2484 |
// fully qualified within the server address and port. |
| 2485 |
func DBNamespace(val string) attribute.KeyValue { |
| 2486 |
return DBNamespaceKey.String(val) |
| 2487 |
} |
| 2488 |
|
| 2489 |
// DBOperationBatchSize returns an attribute KeyValue conforming to the |
| 2490 |
// "db.operation.batch.size" semantic conventions. It represents the number of |
| 2491 |
// queries included in a [batch |
| 2492 |
// operation](/docs/database/database-spans.md#batch-operations). |
| 2493 |
func DBOperationBatchSize(val int) attribute.KeyValue { |
| 2494 |
return DBOperationBatchSizeKey.Int(val) |
| 2495 |
} |
| 2496 |
|
| 2497 |
// DBOperationName returns an attribute KeyValue conforming to the |
| 2498 |
// "db.operation.name" semantic conventions. It represents the name of the |
| 2499 |
// operation or command being executed. |
| 2500 |
func DBOperationName(val string) attribute.KeyValue { |
| 2501 |
return DBOperationNameKey.String(val) |
| 2502 |
} |
| 2503 |
|
| 2504 |
// DBQueryText returns an attribute KeyValue conforming to the |
| 2505 |
// "db.query.text" semantic conventions. It represents the database query being |
| 2506 |
// executed. |
| 2507 |
func DBQueryText(val string) attribute.KeyValue { |
| 2508 |
return DBQueryTextKey.String(val) |
| 2509 |
} |
| 2510 |
|
| 2511 |
// This group defines attributes for Cassandra. |
| 2512 |
const ( |
| 2513 |
// DBCassandraConsistencyLevelKey is the attribute Key conforming to the |
| 2514 |
// "db.cassandra.consistency_level" semantic conventions. It represents the |
| 2515 |
// consistency level of the query. Based on consistency values from |
| 2516 |
// [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). |
| 2517 |
// |
| 2518 |
// Type: Enum |
| 2519 |
// RequirementLevel: Optional |
| 2520 |
// Stability: experimental |
| 2521 |
DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") |
| 2522 |
|
| 2523 |
// DBCassandraCoordinatorDCKey is the attribute Key conforming to the |
| 2524 |
// "db.cassandra.coordinator.dc" semantic conventions. It represents the |
| 2525 |
// data center of the coordinating node for a query. |
| 2526 |
// |
| 2527 |
// Type: string |
| 2528 |
// RequirementLevel: Optional |
| 2529 |
// Stability: experimental |
| 2530 |
// Examples: 'us-west-2' |
| 2531 |
DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") |
| 2532 |
|
| 2533 |
// DBCassandraCoordinatorIDKey is the attribute Key conforming to the |
| 2534 |
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID |
| 2535 |
// of the coordinating node for a query. |
| 2536 |
// |
| 2537 |
// Type: string |
| 2538 |
// RequirementLevel: Optional |
| 2539 |
// Stability: experimental |
| 2540 |
// Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' |
| 2541 |
DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") |
| 2542 |
|
| 2543 |
// DBCassandraIdempotenceKey is the attribute Key conforming to the |
| 2544 |
// "db.cassandra.idempotence" semantic conventions. It represents the |
| 2545 |
// whether or not the query is idempotent. |
| 2546 |
// |
| 2547 |
// Type: boolean |
| 2548 |
// RequirementLevel: Optional |
| 2549 |
// Stability: experimental |
| 2550 |
DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") |
| 2551 |
|
| 2552 |
// DBCassandraPageSizeKey is the attribute Key conforming to the |
| 2553 |
// "db.cassandra.page_size" semantic conventions. It represents the fetch |
| 2554 |
// size used for paging, i.e. how many rows will be returned at once. |
| 2555 |
// |
| 2556 |
// Type: int |
| 2557 |
// RequirementLevel: Optional |
| 2558 |
// Stability: experimental |
| 2559 |
// Examples: 5000 |
| 2560 |
DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") |
| 2561 |
|
| 2562 |
// DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming |
| 2563 |
// to the "db.cassandra.speculative_execution_count" semantic conventions. |
| 2564 |
// It represents the number of times a query was speculatively executed. |
| 2565 |
// Not set or `0` if the query was not executed speculatively. |
| 2566 |
// |
| 2567 |
// Type: int |
| 2568 |
// RequirementLevel: Optional |
| 2569 |
// Stability: experimental |
| 2570 |
// Examples: 0, 2 |
| 2571 |
DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") |
| 2572 |
) |
| 2573 |
|
| 2574 |
var ( |
| 2575 |
// all |
| 2576 |
DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") |
| 2577 |
// each_quorum |
| 2578 |
DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") |
| 2579 |
// quorum |
| 2580 |
DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") |
| 2581 |
// local_quorum |
| 2582 |
DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") |
| 2583 |
// one |
| 2584 |
DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") |
| 2585 |
// two |
| 2586 |
DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") |
| 2587 |
// three |
| 2588 |
DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") |
| 2589 |
// local_one |
| 2590 |
DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") |
| 2591 |
// any |
| 2592 |
DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") |
| 2593 |
// serial |
| 2594 |
DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") |
| 2595 |
// local_serial |
| 2596 |
DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") |
| 2597 |
) |
| 2598 |
|
| 2599 |
// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the |
| 2600 |
// "db.cassandra.coordinator.dc" semantic conventions. It represents the data |
| 2601 |
// center of the coordinating node for a query. |
| 2602 |
func DBCassandraCoordinatorDC(val string) attribute.KeyValue { |
| 2603 |
return DBCassandraCoordinatorDCKey.String(val) |
| 2604 |
} |
| 2605 |
|
| 2606 |
// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the |
| 2607 |
// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of |
| 2608 |
// the coordinating node for a query. |
| 2609 |
func DBCassandraCoordinatorID(val string) attribute.KeyValue { |
| 2610 |
return DBCassandraCoordinatorIDKey.String(val) |
| 2611 |
} |
| 2612 |
|
| 2613 |
// DBCassandraIdempotence returns an attribute KeyValue conforming to the |
| 2614 |
// "db.cassandra.idempotence" semantic conventions. It represents the whether |
| 2615 |
// or not the query is idempotent. |
| 2616 |
func DBCassandraIdempotence(val bool) attribute.KeyValue { |
| 2617 |
return DBCassandraIdempotenceKey.Bool(val) |
| 2618 |
} |
| 2619 |
|
| 2620 |
// DBCassandraPageSize returns an attribute KeyValue conforming to the |
| 2621 |
// "db.cassandra.page_size" semantic conventions. It represents the fetch size |
| 2622 |
// used for paging, i.e. how many rows will be returned at once. |
| 2623 |
func DBCassandraPageSize(val int) attribute.KeyValue { |
| 2624 |
return DBCassandraPageSizeKey.Int(val) |
| 2625 |
} |
| 2626 |
|
| 2627 |
// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue |
| 2628 |
// conforming to the "db.cassandra.speculative_execution_count" semantic |
| 2629 |
// conventions. It represents the number of times a query was speculatively |
| 2630 |
// executed. Not set or `0` if the query was not executed speculatively. |
| 2631 |
func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { |
| 2632 |
return DBCassandraSpeculativeExecutionCountKey.Int(val) |
| 2633 |
} |
| 2634 |
|
| 2635 |
// This group defines attributes for Azure Cosmos DB. |
| 2636 |
const ( |
| 2637 |
// DBCosmosDBClientIDKey is the attribute Key conforming to the |
| 2638 |
// "db.cosmosdb.client_id" semantic conventions. It represents the unique |
| 2639 |
// Cosmos client instance id. |
| 2640 |
// |
| 2641 |
// Type: string |
| 2642 |
// RequirementLevel: Optional |
| 2643 |
// Stability: experimental |
| 2644 |
// Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' |
| 2645 |
DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") |
| 2646 |
|
| 2647 |
// DBCosmosDBConnectionModeKey is the attribute Key conforming to the |
| 2648 |
// "db.cosmosdb.connection_mode" semantic conventions. It represents the |
| 2649 |
// cosmos client connection mode. |
| 2650 |
// |
| 2651 |
// Type: Enum |
| 2652 |
// RequirementLevel: Optional |
| 2653 |
// Stability: experimental |
| 2654 |
DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") |
| 2655 |
|
| 2656 |
// DBCosmosDBOperationTypeKey is the attribute Key conforming to the |
| 2657 |
// "db.cosmosdb.operation_type" semantic conventions. It represents the |
| 2658 |
// cosmosDB Operation Type. |
| 2659 |
// |
| 2660 |
// Type: Enum |
| 2661 |
// RequirementLevel: Optional |
| 2662 |
// Stability: experimental |
| 2663 |
DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") |
| 2664 |
|
| 2665 |
// DBCosmosDBRequestChargeKey is the attribute Key conforming to the |
| 2666 |
// "db.cosmosdb.request_charge" semantic conventions. It represents the rU |
| 2667 |
// consumed for that operation |
| 2668 |
// |
| 2669 |
// Type: double |
| 2670 |
// RequirementLevel: Optional |
| 2671 |
// Stability: experimental |
| 2672 |
// Examples: 46.18, 1.0 |
| 2673 |
DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") |
| 2674 |
|
| 2675 |
// DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the |
| 2676 |
// "db.cosmosdb.request_content_length" semantic conventions. It represents |
| 2677 |
// the request payload size in bytes |
| 2678 |
// |
| 2679 |
// Type: int |
| 2680 |
// RequirementLevel: Optional |
| 2681 |
// Stability: experimental |
| 2682 |
DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") |
| 2683 |
|
| 2684 |
// DBCosmosDBStatusCodeKey is the attribute Key conforming to the |
| 2685 |
// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos |
| 2686 |
// DB status code. |
| 2687 |
// |
| 2688 |
// Type: int |
| 2689 |
// RequirementLevel: Optional |
| 2690 |
// Stability: experimental |
| 2691 |
// Examples: 200, 201 |
| 2692 |
DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") |
| 2693 |
|
| 2694 |
// DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the |
| 2695 |
// "db.cosmosdb.sub_status_code" semantic conventions. It represents the |
| 2696 |
// cosmos DB sub status code. |
| 2697 |
// |
| 2698 |
// Type: int |
| 2699 |
// RequirementLevel: Optional |
| 2700 |
// Stability: experimental |
| 2701 |
// Examples: 1000, 1002 |
| 2702 |
DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") |
| 2703 |
) |
| 2704 |
|
| 2705 |
var ( |
| 2706 |
// Gateway (HTTP) connections mode |
| 2707 |
DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") |
| 2708 |
// Direct connection |
| 2709 |
DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") |
| 2710 |
) |
| 2711 |
|
| 2712 |
var ( |
| 2713 |
// invalid |
| 2714 |
DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") |
| 2715 |
// create |
| 2716 |
DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") |
| 2717 |
// patch |
| 2718 |
DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") |
| 2719 |
// read |
| 2720 |
DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") |
| 2721 |
// read_feed |
| 2722 |
DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") |
| 2723 |
// delete |
| 2724 |
DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") |
| 2725 |
// replace |
| 2726 |
DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") |
| 2727 |
// execute |
| 2728 |
DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") |
| 2729 |
// query |
| 2730 |
DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") |
| 2731 |
// head |
| 2732 |
DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") |
| 2733 |
// head_feed |
| 2734 |
DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") |
| 2735 |
// upsert |
| 2736 |
DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") |
| 2737 |
// batch |
| 2738 |
DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") |
| 2739 |
// query_plan |
| 2740 |
DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") |
| 2741 |
// execute_javascript |
| 2742 |
DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") |
| 2743 |
) |
| 2744 |
|
| 2745 |
// DBCosmosDBClientID returns an attribute KeyValue conforming to the |
| 2746 |
// "db.cosmosdb.client_id" semantic conventions. It represents the unique |
| 2747 |
// Cosmos client instance id. |
| 2748 |
func DBCosmosDBClientID(val string) attribute.KeyValue { |
| 2749 |
return DBCosmosDBClientIDKey.String(val) |
| 2750 |
} |
| 2751 |
|
| 2752 |
// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the |
| 2753 |
// "db.cosmosdb.request_charge" semantic conventions. It represents the rU |
| 2754 |
// consumed for that operation |
| 2755 |
func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { |
| 2756 |
return DBCosmosDBRequestChargeKey.Float64(val) |
| 2757 |
} |
| 2758 |
|
| 2759 |
// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming |
| 2760 |
// to the "db.cosmosdb.request_content_length" semantic conventions. It |
| 2761 |
// represents the request payload size in bytes |
| 2762 |
func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { |
| 2763 |
return DBCosmosDBRequestContentLengthKey.Int(val) |
| 2764 |
} |
| 2765 |
|
| 2766 |
// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the |
| 2767 |
// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB |
| 2768 |
// status code. |
| 2769 |
func DBCosmosDBStatusCode(val int) attribute.KeyValue { |
| 2770 |
return DBCosmosDBStatusCodeKey.Int(val) |
| 2771 |
} |
| 2772 |
|
| 2773 |
// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the |
| 2774 |
// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos |
| 2775 |
// DB sub status code. |
| 2776 |
func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { |
| 2777 |
return DBCosmosDBSubStatusCodeKey.Int(val) |
| 2778 |
} |
| 2779 |
|
| 2780 |
// This group defines attributes for Elasticsearch. |
| 2781 |
const ( |
| 2782 |
// DBElasticsearchNodeNameKey is the attribute Key conforming to the |
| 2783 |
// "db.elasticsearch.node.name" semantic conventions. It represents the |
| 2784 |
// represents the human-readable identifier of the node/instance to which a |
| 2785 |
// request was routed. |
| 2786 |
// |
| 2787 |
// Type: string |
| 2788 |
// RequirementLevel: Optional |
| 2789 |
// Stability: experimental |
| 2790 |
// Examples: 'instance-0000000001' |
| 2791 |
DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name") |
| 2792 |
) |
| 2793 |
|
| 2794 |
// DBElasticsearchNodeName returns an attribute KeyValue conforming to the |
| 2795 |
// "db.elasticsearch.node.name" semantic conventions. It represents the |
| 2796 |
// represents the human-readable identifier of the node/instance to which a |
| 2797 |
// request was routed. |
| 2798 |
func DBElasticsearchNodeName(val string) attribute.KeyValue { |
| 2799 |
return DBElasticsearchNodeNameKey.String(val) |
| 2800 |
} |
| 2801 |
|
| 2802 |
// Attributes for software deployments. |
| 2803 |
const ( |
| 2804 |
// DeploymentEnvironmentNameKey is the attribute Key conforming to the |
| 2805 |
// "deployment.environment.name" semantic conventions. It represents the |
| 2806 |
// name of the [deployment |
| 2807 |
// environment](https://wikipedia.org/wiki/Deployment_environment) (aka |
| 2808 |
// deployment tier). |
| 2809 |
// |
| 2810 |
// Type: string |
| 2811 |
// RequirementLevel: Optional |
| 2812 |
// Stability: experimental |
| 2813 |
// Examples: 'staging', 'production' |
| 2814 |
// Note: `deployment.environment.name` does not affect the uniqueness |
| 2815 |
// constraints defined through |
| 2816 |
// the `service.namespace`, `service.name` and `service.instance.id` |
| 2817 |
// resource attributes. |
| 2818 |
// This implies that resources carrying the following attribute |
| 2819 |
// combinations MUST be |
| 2820 |
// considered to be identifying the same service: |
| 2821 |
// |
| 2822 |
// * `service.name=frontend`, `deployment.environment.name=production` |
| 2823 |
// * `service.name=frontend`, `deployment.environment.name=staging`. |
| 2824 |
DeploymentEnvironmentNameKey = attribute.Key("deployment.environment.name") |
| 2825 |
|
| 2826 |
// DeploymentIDKey is the attribute Key conforming to the "deployment.id" |
| 2827 |
// semantic conventions. It represents the id of the deployment. |
| 2828 |
// |
| 2829 |
// Type: string |
| 2830 |
// RequirementLevel: Optional |
| 2831 |
// Stability: experimental |
| 2832 |
// Examples: '1208' |
| 2833 |
DeploymentIDKey = attribute.Key("deployment.id") |
| 2834 |
|
| 2835 |
// DeploymentNameKey is the attribute Key conforming to the |
| 2836 |
// "deployment.name" semantic conventions. It represents the name of the |
| 2837 |
// deployment. |
| 2838 |
// |
| 2839 |
// Type: string |
| 2840 |
// RequirementLevel: Optional |
| 2841 |
// Stability: experimental |
| 2842 |
// Examples: 'deploy my app', 'deploy-frontend' |
| 2843 |
DeploymentNameKey = attribute.Key("deployment.name") |
| 2844 |
|
| 2845 |
// DeploymentStatusKey is the attribute Key conforming to the |
| 2846 |
// "deployment.status" semantic conventions. It represents the status of |
| 2847 |
// the deployment. |
| 2848 |
// |
| 2849 |
// Type: Enum |
| 2850 |
// RequirementLevel: Optional |
| 2851 |
// Stability: experimental |
| 2852 |
DeploymentStatusKey = attribute.Key("deployment.status") |
| 2853 |
) |
| 2854 |
|
| 2855 |
var ( |
| 2856 |
// failed |
| 2857 |
DeploymentStatusFailed = DeploymentStatusKey.String("failed") |
| 2858 |
// succeeded |
| 2859 |
DeploymentStatusSucceeded = DeploymentStatusKey.String("succeeded") |
| 2860 |
) |
| 2861 |
|
| 2862 |
// DeploymentEnvironmentName returns an attribute KeyValue conforming to the |
| 2863 |
// "deployment.environment.name" semantic conventions. It represents the name |
| 2864 |
// of the [deployment |
| 2865 |
// environment](https://wikipedia.org/wiki/Deployment_environment) (aka |
| 2866 |
// deployment tier). |
| 2867 |
func DeploymentEnvironmentName(val string) attribute.KeyValue { |
| 2868 |
return DeploymentEnvironmentNameKey.String(val) |
| 2869 |
} |
| 2870 |
|
| 2871 |
// DeploymentID returns an attribute KeyValue conforming to the |
| 2872 |
// "deployment.id" semantic conventions. It represents the id of the |
| 2873 |
// deployment. |
| 2874 |
func DeploymentID(val string) attribute.KeyValue { |
| 2875 |
return DeploymentIDKey.String(val) |
| 2876 |
} |
| 2877 |
|
| 2878 |
// DeploymentName returns an attribute KeyValue conforming to the |
| 2879 |
// "deployment.name" semantic conventions. It represents the name of the |
| 2880 |
// deployment. |
| 2881 |
func DeploymentName(val string) attribute.KeyValue { |
| 2882 |
return DeploymentNameKey.String(val) |
| 2883 |
} |
| 2884 |
|
| 2885 |
// Attributes that represents an occurrence of a lifecycle transition on the |
| 2886 |
// Android platform. |
| 2887 |
const ( |
| 2888 |
// AndroidStateKey is the attribute Key conforming to the "android.state" |
| 2889 |
// semantic conventions. It represents the deprecated use the |
| 2890 |
// `device.app.lifecycle` event definition including `android.state` as a |
| 2891 |
// payload field instead. |
| 2892 |
// |
| 2893 |
// Type: Enum |
| 2894 |
// RequirementLevel: Optional |
| 2895 |
// Stability: experimental |
| 2896 |
// Note: The Android lifecycle states are defined in [Activity lifecycle |
| 2897 |
// callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), |
| 2898 |
// and from which the `OS identifiers` are derived. |
| 2899 |
AndroidStateKey = attribute.Key("android.state") |
| 2900 |
) |
| 2901 |
|
| 2902 |
var ( |
| 2903 |
// Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time |
| 2904 |
AndroidStateCreated = AndroidStateKey.String("created") |
| 2905 |
// Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state |
| 2906 |
AndroidStateBackground = AndroidStateKey.String("background") |
| 2907 |
// Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states |
| 2908 |
AndroidStateForeground = AndroidStateKey.String("foreground") |
| 2909 |
) |
| 2910 |
|
| 2911 |
// These attributes may be used to describe the receiver of a network |
| 2912 |
// exchange/packet. These should be used when there is no client/server |
| 2913 |
// relationship between the two sides, or when that relationship is unknown. |
| 2914 |
// This covers low-level network interactions (e.g. packet tracing) where you |
| 2915 |
// don't know if there was a connection or which side initiated it. This also |
| 2916 |
// covers unidirectional UDP flows and peer-to-peer communication where the |
| 2917 |
// "user-facing" surface of the protocol / API doesn't expose a clear notion of |
| 2918 |
// client and server. |
| 2919 |
const ( |
| 2920 |
// DestinationAddressKey is the attribute Key conforming to the |
| 2921 |
// "destination.address" semantic conventions. It represents the |
| 2922 |
// destination address - domain name if available without reverse DNS |
| 2923 |
// lookup; otherwise, IP address or Unix domain socket name. |
| 2924 |
// |
| 2925 |
// Type: string |
| 2926 |
// RequirementLevel: Optional |
| 2927 |
// Stability: experimental |
| 2928 |
// Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' |
| 2929 |
// Note: When observed from the source side, and when communicating through |
| 2930 |
// an intermediary, `destination.address` SHOULD represent the destination |
| 2931 |
// address behind any intermediaries, for example proxies, if it's |
| 2932 |
// available. |
| 2933 |
DestinationAddressKey = attribute.Key("destination.address") |
| 2934 |
|
| 2935 |
// DestinationPortKey is the attribute Key conforming to the |
| 2936 |
// "destination.port" semantic conventions. It represents the destination |
| 2937 |
// port number |
| 2938 |
// |
| 2939 |
// Type: int |
| 2940 |
// RequirementLevel: Optional |
| 2941 |
// Stability: experimental |
| 2942 |
// Examples: 3389, 2888 |
| 2943 |
DestinationPortKey = attribute.Key("destination.port") |
| 2944 |
) |
| 2945 |
|
| 2946 |
// DestinationAddress returns an attribute KeyValue conforming to the |
| 2947 |
// "destination.address" semantic conventions. It represents the destination |
| 2948 |
// address - domain name if available without reverse DNS lookup; otherwise, IP |
| 2949 |
// address or Unix domain socket name. |
| 2950 |
func DestinationAddress(val string) attribute.KeyValue { |
| 2951 |
return DestinationAddressKey.String(val) |
| 2952 |
} |
| 2953 |
|
| 2954 |
// DestinationPort returns an attribute KeyValue conforming to the |
| 2955 |
// "destination.port" semantic conventions. It represents the destination port |
| 2956 |
// number |
| 2957 |
func DestinationPort(val int) attribute.KeyValue { |
| 2958 |
return DestinationPortKey.Int(val) |
| 2959 |
} |
| 2960 |
|
| 2961 |
// Describes device attributes. |
| 2962 |
const ( |
| 2963 |
// DeviceIDKey is the attribute Key conforming to the "device.id" semantic |
| 2964 |
// conventions. It represents a unique identifier representing the device |
| 2965 |
// |
| 2966 |
// Type: string |
| 2967 |
// RequirementLevel: Optional |
| 2968 |
// Stability: experimental |
| 2969 |
// Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' |
| 2970 |
// Note: The device identifier MUST only be defined using the values |
| 2971 |
// outlined below. This value is not an advertising identifier and MUST NOT |
| 2972 |
// be used as such. On iOS (Swift or Objective-C), this value MUST be equal |
| 2973 |
// to the [vendor |
| 2974 |
// identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). |
| 2975 |
// On Android (Java or Kotlin), this value MUST be equal to the Firebase |
| 2976 |
// Installation ID or a globally unique UUID which is persisted across |
| 2977 |
// sessions in your application. More information can be found |
| 2978 |
// [here](https://developer.android.com/training/articles/user-data-ids) on |
| 2979 |
// best practices and exact implementation details. Caution should be taken |
| 2980 |
// when storing personal data or anything which can identify a user. GDPR |
| 2981 |
// and data protection laws may apply, ensure you do your own due |
| 2982 |
// diligence. |
| 2983 |
DeviceIDKey = attribute.Key("device.id") |
| 2984 |
|
| 2985 |
// DeviceManufacturerKey is the attribute Key conforming to the |
| 2986 |
// "device.manufacturer" semantic conventions. It represents the name of |
| 2987 |
// the device manufacturer |
| 2988 |
// |
| 2989 |
// Type: string |
| 2990 |
// RequirementLevel: Optional |
| 2991 |
// Stability: experimental |
| 2992 |
// Examples: 'Apple', 'Samsung' |
| 2993 |
// Note: The Android OS provides this field via |
| 2994 |
// [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). |
| 2995 |
// iOS apps SHOULD hardcode the value `Apple`. |
| 2996 |
DeviceManufacturerKey = attribute.Key("device.manufacturer") |
| 2997 |
|
| 2998 |
// DeviceModelIdentifierKey is the attribute Key conforming to the |
| 2999 |
// "device.model.identifier" semantic conventions. It represents the model |
| 3000 |
// identifier for the device |
| 3001 |
// |
| 3002 |
// Type: string |
| 3003 |
// RequirementLevel: Optional |
| 3004 |
// Stability: experimental |
| 3005 |
// Examples: 'iPhone3,4', 'SM-G920F' |
| 3006 |
// Note: It's recommended this value represents a machine-readable version |
| 3007 |
// of the model identifier rather than the market or consumer-friendly name |
| 3008 |
// of the device. |
| 3009 |
DeviceModelIdentifierKey = attribute.Key("device.model.identifier") |
| 3010 |
|
| 3011 |
// DeviceModelNameKey is the attribute Key conforming to the |
| 3012 |
// "device.model.name" semantic conventions. It represents the marketing |
| 3013 |
// name for the device model |
| 3014 |
// |
| 3015 |
// Type: string |
| 3016 |
// RequirementLevel: Optional |
| 3017 |
// Stability: experimental |
| 3018 |
// Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' |
| 3019 |
// Note: It's recommended this value represents a human-readable version of |
| 3020 |
// the device model rather than a machine-readable alternative. |
| 3021 |
DeviceModelNameKey = attribute.Key("device.model.name") |
| 3022 |
) |
| 3023 |
|
| 3024 |
// DeviceID returns an attribute KeyValue conforming to the "device.id" |
| 3025 |
// semantic conventions. It represents a unique identifier representing the |
| 3026 |
// device |
| 3027 |
func DeviceID(val string) attribute.KeyValue { |
| 3028 |
return DeviceIDKey.String(val) |
| 3029 |
} |
| 3030 |
|
| 3031 |
// DeviceManufacturer returns an attribute KeyValue conforming to the |
| 3032 |
// "device.manufacturer" semantic conventions. It represents the name of the |
| 3033 |
// device manufacturer |
| 3034 |
func DeviceManufacturer(val string) attribute.KeyValue { |
| 3035 |
return DeviceManufacturerKey.String(val) |
| 3036 |
} |
| 3037 |
|
| 3038 |
// DeviceModelIdentifier returns an attribute KeyValue conforming to the |
| 3039 |
// "device.model.identifier" semantic conventions. It represents the model |
| 3040 |
// identifier for the device |
| 3041 |
func DeviceModelIdentifier(val string) attribute.KeyValue { |
| 3042 |
return DeviceModelIdentifierKey.String(val) |
| 3043 |
} |
| 3044 |
|
| 3045 |
// DeviceModelName returns an attribute KeyValue conforming to the |
| 3046 |
// "device.model.name" semantic conventions. It represents the marketing name |
| 3047 |
// for the device model |
| 3048 |
func DeviceModelName(val string) attribute.KeyValue { |
| 3049 |
return DeviceModelNameKey.String(val) |
| 3050 |
} |
| 3051 |
|
| 3052 |
// These attributes may be used for any disk related operation. |
| 3053 |
const ( |
| 3054 |
// DiskIoDirectionKey is the attribute Key conforming to the |
| 3055 |
// "disk.io.direction" semantic conventions. It represents the disk IO |
| 3056 |
// operation direction. |
| 3057 |
// |
| 3058 |
// Type: Enum |
| 3059 |
// RequirementLevel: Optional |
| 3060 |
// Stability: experimental |
| 3061 |
// Examples: 'read' |
| 3062 |
DiskIoDirectionKey = attribute.Key("disk.io.direction") |
| 3063 |
) |
| 3064 |
|
| 3065 |
var ( |
| 3066 |
// read |
| 3067 |
DiskIoDirectionRead = DiskIoDirectionKey.String("read") |
| 3068 |
// write |
| 3069 |
DiskIoDirectionWrite = DiskIoDirectionKey.String("write") |
| 3070 |
) |
| 3071 |
|
| 3072 |
// The shared attributes used to report a DNS query. |
| 3073 |
const ( |
| 3074 |
// DNSQuestionNameKey is the attribute Key conforming to the |
| 3075 |
// "dns.question.name" semantic conventions. It represents the name being |
| 3076 |
// queried. |
| 3077 |
// |
| 3078 |
// Type: string |
| 3079 |
// RequirementLevel: Optional |
| 3080 |
// Stability: experimental |
| 3081 |
// Examples: 'www.example.com', 'opentelemetry.io' |
| 3082 |
// Note: If the name field contains non-printable characters (below 32 or |
| 3083 |
// above 126), those characters should be represented as escaped base 10 |
| 3084 |
// integers (\DDD). Back slashes and quotes should be escaped. Tabs, |
| 3085 |
// carriage returns, and line feeds should be converted to \t, \r, and \n |
| 3086 |
// respectively. |
| 3087 |
DNSQuestionNameKey = attribute.Key("dns.question.name") |
| 3088 |
) |
| 3089 |
|
| 3090 |
// DNSQuestionName returns an attribute KeyValue conforming to the |
| 3091 |
// "dns.question.name" semantic conventions. It represents the name being |
| 3092 |
// queried. |
| 3093 |
func DNSQuestionName(val string) attribute.KeyValue { |
| 3094 |
return DNSQuestionNameKey.String(val) |
| 3095 |
} |
| 3096 |
|
| 3097 |
// The shared attributes used to report an error. |
| 3098 |
const ( |
| 3099 |
// ErrorTypeKey is the attribute Key conforming to the "error.type" |
| 3100 |
// semantic conventions. It represents the describes a class of error the |
| 3101 |
// operation ended with. |
| 3102 |
// |
| 3103 |
// Type: Enum |
| 3104 |
// RequirementLevel: Optional |
| 3105 |
// Stability: stable |
| 3106 |
// Examples: 'timeout', 'java.net.UnknownHostException', |
| 3107 |
// 'server_certificate_invalid', '500' |
| 3108 |
// Note: The `error.type` SHOULD be predictable, and SHOULD have low |
| 3109 |
// cardinality. |
| 3110 |
// |
| 3111 |
// When `error.type` is set to a type (e.g., an exception type), its |
| 3112 |
// canonical class name identifying the type within the artifact SHOULD be |
| 3113 |
// used. |
| 3114 |
// |
| 3115 |
// Instrumentations SHOULD document the list of errors they report. |
| 3116 |
// |
| 3117 |
// The cardinality of `error.type` within one instrumentation library |
| 3118 |
// SHOULD be low. |
| 3119 |
// Telemetry consumers that aggregate data from multiple instrumentation |
| 3120 |
// libraries and applications |
| 3121 |
// should be prepared for `error.type` to have high cardinality at query |
| 3122 |
// time when no |
| 3123 |
// additional filters are applied. |
| 3124 |
// |
| 3125 |
// If the operation has completed successfully, instrumentations SHOULD NOT |
| 3126 |
// set `error.type`. |
| 3127 |
// |
| 3128 |
// If a specific domain defines its own set of error identifiers (such as |
| 3129 |
// HTTP or gRPC status codes), |
| 3130 |
// it's RECOMMENDED to: |
| 3131 |
// |
| 3132 |
// * Use a domain-specific attribute |
| 3133 |
// * Set `error.type` to capture all errors, regardless of whether they are |
| 3134 |
// defined within the domain-specific set or not. |
| 3135 |
ErrorTypeKey = attribute.Key("error.type") |
| 3136 |
) |
| 3137 |
|
| 3138 |
var ( |
| 3139 |
// A fallback error value to be used when the instrumentation doesn't define a custom value |
| 3140 |
ErrorTypeOther = ErrorTypeKey.String("_OTHER") |
| 3141 |
) |
| 3142 |
|
| 3143 |
// Attributes for Events represented using Log Records. |
| 3144 |
const ( |
| 3145 |
// EventNameKey is the attribute Key conforming to the "event.name" |
| 3146 |
// semantic conventions. It represents the identifies the class / type of |
| 3147 |
// event. |
| 3148 |
// |
| 3149 |
// Type: string |
| 3150 |
// RequirementLevel: Optional |
| 3151 |
// Stability: experimental |
| 3152 |
// Examples: 'browser.mouse.click', 'device.app.lifecycle' |
| 3153 |
// Note: Event names are subject to the same rules as [attribute |
| 3154 |
// names](/docs/general/attribute-naming.md). Notably, event names are |
| 3155 |
// namespaced to avoid collisions and provide a clean separation of |
| 3156 |
// semantics for events in separate domains like browser, mobile, and |
| 3157 |
// kubernetes. |
| 3158 |
EventNameKey = attribute.Key("event.name") |
| 3159 |
) |
| 3160 |
|
| 3161 |
// EventName returns an attribute KeyValue conforming to the "event.name" |
| 3162 |
// semantic conventions. It represents the identifies the class / type of |
| 3163 |
// event. |
| 3164 |
func EventName(val string) attribute.KeyValue { |
| 3165 |
return EventNameKey.String(val) |
| 3166 |
} |
| 3167 |
|
| 3168 |
// The shared attributes used to report a single exception associated with a |
| 3169 |
// span or log. |
| 3170 |
const ( |
| 3171 |
// ExceptionEscapedKey is the attribute Key conforming to the |
| 3172 |
// "exception.escaped" semantic conventions. It represents the sHOULD be |
| 3173 |
// set to true if the exception event is recorded at a point where it is |
| 3174 |
// known that the exception is escaping the scope of the span. |
| 3175 |
// |
| 3176 |
// Type: boolean |
| 3177 |
// RequirementLevel: Optional |
| 3178 |
// Stability: stable |
| 3179 |
// Note: An exception is considered to have escaped (or left) the scope of |
| 3180 |
// a span, |
| 3181 |
// if that span is ended while the exception is still logically "in |
| 3182 |
// flight". |
| 3183 |
// This may be actually "in flight" in some languages (e.g. if the |
| 3184 |
// exception |
| 3185 |
// is passed to a Context manager's `__exit__` method in Python) but will |
| 3186 |
// usually be caught at the point of recording the exception in most |
| 3187 |
// languages. |
| 3188 |
// |
| 3189 |
// It is usually not possible to determine at the point where an exception |
| 3190 |
// is thrown |
| 3191 |
// whether it will escape the scope of a span. |
| 3192 |
// However, it is trivial to know that an exception |
| 3193 |
// will escape, if one checks for an active exception just before ending |
| 3194 |
// the span, |
| 3195 |
// as done in the [example for recording span |
| 3196 |
// exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception). |
| 3197 |
// |
| 3198 |
// It follows that an exception may still escape the scope of the span |
| 3199 |
// even if the `exception.escaped` attribute was not set or set to false, |
| 3200 |
// since the event might have been recorded at a time where it was not |
| 3201 |
// clear whether the exception will escape. |
| 3202 |
ExceptionEscapedKey = attribute.Key("exception.escaped") |
| 3203 |
|
| 3204 |
// ExceptionMessageKey is the attribute Key conforming to the |
| 3205 |
// "exception.message" semantic conventions. It represents the exception |
| 3206 |
// message. |
| 3207 |
// |
| 3208 |
// Type: string |
| 3209 |
// RequirementLevel: Optional |
| 3210 |
// Stability: stable |
| 3211 |
// Examples: 'Division by zero', "Can't convert 'int' object to str |
| 3212 |
// implicitly" |
| 3213 |
ExceptionMessageKey = attribute.Key("exception.message") |
| 3214 |
|
| 3215 |
// ExceptionStacktraceKey is the attribute Key conforming to the |
| 3216 |
// "exception.stacktrace" semantic conventions. It represents a stacktrace |
| 3217 |
// as a string in the natural representation for the language runtime. The |
| 3218 |
// representation is to be determined and documented by each language SIG. |
| 3219 |
// |
| 3220 |
// Type: string |
| 3221 |
// RequirementLevel: Optional |
| 3222 |
// Stability: stable |
| 3223 |
// Examples: 'Exception in thread "main" java.lang.RuntimeException: Test |
| 3224 |
// exception\\n at ' |
| 3225 |
// 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' |
| 3226 |
// 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' |
| 3227 |
// 'com.example.GenerateTrace.main(GenerateTrace.java:5)' |
| 3228 |
ExceptionStacktraceKey = attribute.Key("exception.stacktrace") |
| 3229 |
|
| 3230 |
// ExceptionTypeKey is the attribute Key conforming to the "exception.type" |
| 3231 |
// semantic conventions. It represents the type of the exception (its |
| 3232 |
// fully-qualified class name, if applicable). The dynamic type of the |
| 3233 |
// exception should be preferred over the static type in languages that |
| 3234 |
// support it. |
| 3235 |
// |
| 3236 |
// Type: string |
| 3237 |
// RequirementLevel: Optional |
| 3238 |
// Stability: stable |
| 3239 |
// Examples: 'java.net.ConnectException', 'OSError' |
| 3240 |
ExceptionTypeKey = attribute.Key("exception.type") |
| 3241 |
) |
| 3242 |
|
| 3243 |
// ExceptionEscaped returns an attribute KeyValue conforming to the |
| 3244 |
// "exception.escaped" semantic conventions. It represents the sHOULD be set to |
| 3245 |
// true if the exception event is recorded at a point where it is known that |
| 3246 |
// the exception is escaping the scope of the span. |
| 3247 |
func ExceptionEscaped(val bool) attribute.KeyValue { |
| 3248 |
return ExceptionEscapedKey.Bool(val) |
| 3249 |
} |
| 3250 |
|
| 3251 |
// ExceptionMessage returns an attribute KeyValue conforming to the |
| 3252 |
// "exception.message" semantic conventions. It represents the exception |
| 3253 |
// message. |
| 3254 |
func ExceptionMessage(val string) attribute.KeyValue { |
| 3255 |
return ExceptionMessageKey.String(val) |
| 3256 |
} |
| 3257 |
|
| 3258 |
// ExceptionStacktrace returns an attribute KeyValue conforming to the |
| 3259 |
// "exception.stacktrace" semantic conventions. It represents a stacktrace as a |
| 3260 |
// string in the natural representation for the language runtime. The |
| 3261 |
// representation is to be determined and documented by each language SIG. |
| 3262 |
func ExceptionStacktrace(val string) attribute.KeyValue { |
| 3263 |
return ExceptionStacktraceKey.String(val) |
| 3264 |
} |
| 3265 |
|
| 3266 |
// ExceptionType returns an attribute KeyValue conforming to the |
| 3267 |
// "exception.type" semantic conventions. It represents the type of the |
| 3268 |
// exception (its fully-qualified class name, if applicable). The dynamic type |
| 3269 |
// of the exception should be preferred over the static type in languages that |
| 3270 |
// support it. |
| 3271 |
func ExceptionType(val string) attribute.KeyValue { |
| 3272 |
return ExceptionTypeKey.String(val) |
| 3273 |
} |
| 3274 |
|
| 3275 |
// FaaS attributes |
| 3276 |
const ( |
| 3277 |
// FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" |
| 3278 |
// semantic conventions. It represents a boolean that is true if the |
| 3279 |
// serverless function is executed for the first time (aka cold-start). |
| 3280 |
// |
| 3281 |
// Type: boolean |
| 3282 |
// RequirementLevel: Optional |
| 3283 |
// Stability: experimental |
| 3284 |
FaaSColdstartKey = attribute.Key("faas.coldstart") |
| 3285 |
|
| 3286 |
// FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic |
| 3287 |
// conventions. It represents a string containing the schedule period as |
| 3288 |
// [Cron |
| 3289 |
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). |
| 3290 |
// |
| 3291 |
// Type: string |
| 3292 |
// RequirementLevel: Optional |
| 3293 |
// Stability: experimental |
| 3294 |
// Examples: '0/5 * * * ? *' |
| 3295 |
FaaSCronKey = attribute.Key("faas.cron") |
| 3296 |
|
| 3297 |
// FaaSDocumentCollectionKey is the attribute Key conforming to the |
| 3298 |
// "faas.document.collection" semantic conventions. It represents the name |
| 3299 |
// of the source on which the triggering operation was performed. For |
| 3300 |
// example, in Cloud Storage or S3 corresponds to the bucket name, and in |
| 3301 |
// Cosmos DB to the database name. |
| 3302 |
// |
| 3303 |
// Type: string |
| 3304 |
// RequirementLevel: Optional |
| 3305 |
// Stability: experimental |
| 3306 |
// Examples: 'myBucketName', 'myDBName' |
| 3307 |
FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") |
| 3308 |
|
| 3309 |
// FaaSDocumentNameKey is the attribute Key conforming to the |
| 3310 |
// "faas.document.name" semantic conventions. It represents the document |
| 3311 |
// name/table subjected to the operation. For example, in Cloud Storage or |
| 3312 |
// S3 is the name of the file, and in Cosmos DB the table name. |
| 3313 |
// |
| 3314 |
// Type: string |
| 3315 |
// RequirementLevel: Optional |
| 3316 |
// Stability: experimental |
| 3317 |
// Examples: 'myFile.txt', 'myTableName' |
| 3318 |
FaaSDocumentNameKey = attribute.Key("faas.document.name") |
| 3319 |
|
| 3320 |
// FaaSDocumentOperationKey is the attribute Key conforming to the |
| 3321 |
// "faas.document.operation" semantic conventions. It represents the |
| 3322 |
// describes the type of the operation that was performed on the data. |
| 3323 |
// |
| 3324 |
// Type: Enum |
| 3325 |
// RequirementLevel: Optional |
| 3326 |
// Stability: experimental |
| 3327 |
FaaSDocumentOperationKey = attribute.Key("faas.document.operation") |
| 3328 |
|
| 3329 |
// FaaSDocumentTimeKey is the attribute Key conforming to the |
| 3330 |
// "faas.document.time" semantic conventions. It represents a string |
| 3331 |
// containing the time when the data was accessed in the [ISO |
| 3332 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 3333 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 3334 |
// |
| 3335 |
// Type: string |
| 3336 |
// RequirementLevel: Optional |
| 3337 |
// Stability: experimental |
| 3338 |
// Examples: '2020-01-23T13:47:06Z' |
| 3339 |
FaaSDocumentTimeKey = attribute.Key("faas.document.time") |
| 3340 |
|
| 3341 |
// FaaSInstanceKey is the attribute Key conforming to the "faas.instance" |
| 3342 |
// semantic conventions. It represents the execution environment ID as a |
| 3343 |
// string, that will be potentially reused for other invocations to the |
| 3344 |
// same function/function version. |
| 3345 |
// |
| 3346 |
// Type: string |
| 3347 |
// RequirementLevel: Optional |
| 3348 |
// Stability: experimental |
| 3349 |
// Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' |
| 3350 |
// Note: * **AWS Lambda:** Use the (full) log stream name. |
| 3351 |
FaaSInstanceKey = attribute.Key("faas.instance") |
| 3352 |
|
| 3353 |
// FaaSInvocationIDKey is the attribute Key conforming to the |
| 3354 |
// "faas.invocation_id" semantic conventions. It represents the invocation |
| 3355 |
// ID of the current function invocation. |
| 3356 |
// |
| 3357 |
// Type: string |
| 3358 |
// RequirementLevel: Optional |
| 3359 |
// Stability: experimental |
| 3360 |
// Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' |
| 3361 |
FaaSInvocationIDKey = attribute.Key("faas.invocation_id") |
| 3362 |
|
| 3363 |
// FaaSInvokedNameKey is the attribute Key conforming to the |
| 3364 |
// "faas.invoked_name" semantic conventions. It represents the name of the |
| 3365 |
// invoked function. |
| 3366 |
// |
| 3367 |
// Type: string |
| 3368 |
// RequirementLevel: Optional |
| 3369 |
// Stability: experimental |
| 3370 |
// Examples: 'my-function' |
| 3371 |
// Note: SHOULD be equal to the `faas.name` resource attribute of the |
| 3372 |
// invoked function. |
| 3373 |
FaaSInvokedNameKey = attribute.Key("faas.invoked_name") |
| 3374 |
|
| 3375 |
// FaaSInvokedProviderKey is the attribute Key conforming to the |
| 3376 |
// "faas.invoked_provider" semantic conventions. It represents the cloud |
| 3377 |
// provider of the invoked function. |
| 3378 |
// |
| 3379 |
// Type: Enum |
| 3380 |
// RequirementLevel: Optional |
| 3381 |
// Stability: experimental |
| 3382 |
// Note: SHOULD be equal to the `cloud.provider` resource attribute of the |
| 3383 |
// invoked function. |
| 3384 |
FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") |
| 3385 |
|
| 3386 |
// FaaSInvokedRegionKey is the attribute Key conforming to the |
| 3387 |
// "faas.invoked_region" semantic conventions. It represents the cloud |
| 3388 |
// region of the invoked function. |
| 3389 |
// |
| 3390 |
// Type: string |
| 3391 |
// RequirementLevel: Optional |
| 3392 |
// Stability: experimental |
| 3393 |
// Examples: 'eu-central-1' |
| 3394 |
// Note: SHOULD be equal to the `cloud.region` resource attribute of the |
| 3395 |
// invoked function. |
| 3396 |
FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") |
| 3397 |
|
| 3398 |
// FaaSMaxMemoryKey is the attribute Key conforming to the |
| 3399 |
// "faas.max_memory" semantic conventions. It represents the amount of |
| 3400 |
// memory available to the serverless function converted to Bytes. |
| 3401 |
// |
| 3402 |
// Type: int |
| 3403 |
// RequirementLevel: Optional |
| 3404 |
// Stability: experimental |
| 3405 |
// Examples: 134217728 |
| 3406 |
// Note: It's recommended to set this attribute since e.g. too little |
| 3407 |
// memory can easily stop a Java AWS Lambda function from working |
| 3408 |
// correctly. On AWS Lambda, the environment variable |
| 3409 |
// `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must |
| 3410 |
// be multiplied by 1,048,576). |
| 3411 |
FaaSMaxMemoryKey = attribute.Key("faas.max_memory") |
| 3412 |
|
| 3413 |
// FaaSNameKey is the attribute Key conforming to the "faas.name" semantic |
| 3414 |
// conventions. It represents the name of the single function that this |
| 3415 |
// runtime instance executes. |
| 3416 |
// |
| 3417 |
// Type: string |
| 3418 |
// RequirementLevel: Optional |
| 3419 |
// Stability: experimental |
| 3420 |
// Examples: 'my-function', 'myazurefunctionapp/some-function-name' |
| 3421 |
// Note: This is the name of the function as configured/deployed on the |
| 3422 |
// FaaS |
| 3423 |
// platform and is usually different from the name of the callback |
| 3424 |
// function (which may be stored in the |
| 3425 |
// [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) |
| 3426 |
// span attributes). |
| 3427 |
// |
| 3428 |
// For some cloud providers, the above definition is ambiguous. The |
| 3429 |
// following |
| 3430 |
// definition of function name MUST be used for this attribute |
| 3431 |
// (and consequently the span name) for the listed cloud |
| 3432 |
// providers/products: |
| 3433 |
// |
| 3434 |
// * **Azure:** The full name `<FUNCAPP>/<FUNC>`, i.e., function app name |
| 3435 |
// followed by a forward slash followed by the function name (this form |
| 3436 |
// can also be seen in the resource JSON for the function). |
| 3437 |
// This means that a span attribute MUST be used, as an Azure function |
| 3438 |
// app can host multiple functions that would usually share |
| 3439 |
// a TracerProvider (see also the `cloud.resource_id` attribute). |
| 3440 |
FaaSNameKey = attribute.Key("faas.name") |
| 3441 |
|
| 3442 |
// FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic |
| 3443 |
// conventions. It represents a string containing the function invocation |
| 3444 |
// time in the [ISO |
| 3445 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 3446 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 3447 |
// |
| 3448 |
// Type: string |
| 3449 |
// RequirementLevel: Optional |
| 3450 |
// Stability: experimental |
| 3451 |
// Examples: '2020-01-23T13:47:06Z' |
| 3452 |
FaaSTimeKey = attribute.Key("faas.time") |
| 3453 |
|
| 3454 |
// FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" |
| 3455 |
// semantic conventions. It represents the type of the trigger which caused |
| 3456 |
// this function invocation. |
| 3457 |
// |
| 3458 |
// Type: Enum |
| 3459 |
// RequirementLevel: Optional |
| 3460 |
// Stability: experimental |
| 3461 |
FaaSTriggerKey = attribute.Key("faas.trigger") |
| 3462 |
|
| 3463 |
// FaaSVersionKey is the attribute Key conforming to the "faas.version" |
| 3464 |
// semantic conventions. It represents the immutable version of the |
| 3465 |
// function being executed. |
| 3466 |
// |
| 3467 |
// Type: string |
| 3468 |
// RequirementLevel: Optional |
| 3469 |
// Stability: experimental |
| 3470 |
// Examples: '26', 'pinkfroid-00002' |
| 3471 |
// Note: Depending on the cloud provider and platform, use: |
| 3472 |
// |
| 3473 |
// * **AWS Lambda:** The [function |
| 3474 |
// version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) |
| 3475 |
// (an integer represented as a decimal string). |
| 3476 |
// * **Google Cloud Run (Services):** The |
| 3477 |
// [revision](https://cloud.google.com/run/docs/managing/revisions) |
| 3478 |
// (i.e., the function name plus the revision suffix). |
| 3479 |
// * **Google Cloud Functions:** The value of the |
| 3480 |
// [`K_REVISION` environment |
| 3481 |
// variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). |
| 3482 |
// * **Azure Functions:** Not applicable. Do not set this attribute. |
| 3483 |
FaaSVersionKey = attribute.Key("faas.version") |
| 3484 |
) |
| 3485 |
|
| 3486 |
var ( |
| 3487 |
// When a new object is created |
| 3488 |
FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") |
| 3489 |
// When an object is modified |
| 3490 |
FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") |
| 3491 |
// When an object is deleted |
| 3492 |
FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") |
| 3493 |
) |
| 3494 |
|
| 3495 |
var ( |
| 3496 |
// Alibaba Cloud |
| 3497 |
FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") |
| 3498 |
// Amazon Web Services |
| 3499 |
FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") |
| 3500 |
// Microsoft Azure |
| 3501 |
FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") |
| 3502 |
// Google Cloud Platform |
| 3503 |
FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") |
| 3504 |
// Tencent Cloud |
| 3505 |
FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") |
| 3506 |
) |
| 3507 |
|
| 3508 |
var ( |
| 3509 |
// A response to some data source operation such as a database or filesystem read/write |
| 3510 |
FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") |
| 3511 |
// To provide an answer to an inbound HTTP request |
| 3512 |
FaaSTriggerHTTP = FaaSTriggerKey.String("http") |
| 3513 |
// A function is set to be executed when messages are sent to a messaging system |
| 3514 |
FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") |
| 3515 |
// A function is scheduled to be executed regularly |
| 3516 |
FaaSTriggerTimer = FaaSTriggerKey.String("timer") |
| 3517 |
// If none of the others apply |
| 3518 |
FaaSTriggerOther = FaaSTriggerKey.String("other") |
| 3519 |
) |
| 3520 |
|
| 3521 |
// FaaSColdstart returns an attribute KeyValue conforming to the |
| 3522 |
// "faas.coldstart" semantic conventions. It represents a boolean that is true |
| 3523 |
// if the serverless function is executed for the first time (aka cold-start). |
| 3524 |
func FaaSColdstart(val bool) attribute.KeyValue { |
| 3525 |
return FaaSColdstartKey.Bool(val) |
| 3526 |
} |
| 3527 |
|
| 3528 |
// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" |
| 3529 |
// semantic conventions. It represents a string containing the schedule period |
| 3530 |
// as [Cron |
| 3531 |
// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). |
| 3532 |
func FaaSCron(val string) attribute.KeyValue { |
| 3533 |
return FaaSCronKey.String(val) |
| 3534 |
} |
| 3535 |
|
| 3536 |
// FaaSDocumentCollection returns an attribute KeyValue conforming to the |
| 3537 |
// "faas.document.collection" semantic conventions. It represents the name of |
| 3538 |
// the source on which the triggering operation was performed. For example, in |
| 3539 |
// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the |
| 3540 |
// database name. |
| 3541 |
func FaaSDocumentCollection(val string) attribute.KeyValue { |
| 3542 |
return FaaSDocumentCollectionKey.String(val) |
| 3543 |
} |
| 3544 |
|
| 3545 |
// FaaSDocumentName returns an attribute KeyValue conforming to the |
| 3546 |
// "faas.document.name" semantic conventions. It represents the document |
| 3547 |
// name/table subjected to the operation. For example, in Cloud Storage or S3 |
| 3548 |
// is the name of the file, and in Cosmos DB the table name. |
| 3549 |
func FaaSDocumentName(val string) attribute.KeyValue { |
| 3550 |
return FaaSDocumentNameKey.String(val) |
| 3551 |
} |
| 3552 |
|
| 3553 |
// FaaSDocumentTime returns an attribute KeyValue conforming to the |
| 3554 |
// "faas.document.time" semantic conventions. It represents a string containing |
| 3555 |
// the time when the data was accessed in the [ISO |
| 3556 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 3557 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 3558 |
func FaaSDocumentTime(val string) attribute.KeyValue { |
| 3559 |
return FaaSDocumentTimeKey.String(val) |
| 3560 |
} |
| 3561 |
|
| 3562 |
// FaaSInstance returns an attribute KeyValue conforming to the |
| 3563 |
// "faas.instance" semantic conventions. It represents the execution |
| 3564 |
// environment ID as a string, that will be potentially reused for other |
| 3565 |
// invocations to the same function/function version. |
| 3566 |
func FaaSInstance(val string) attribute.KeyValue { |
| 3567 |
return FaaSInstanceKey.String(val) |
| 3568 |
} |
| 3569 |
|
| 3570 |
// FaaSInvocationID returns an attribute KeyValue conforming to the |
| 3571 |
// "faas.invocation_id" semantic conventions. It represents the invocation ID |
| 3572 |
// of the current function invocation. |
| 3573 |
func FaaSInvocationID(val string) attribute.KeyValue { |
| 3574 |
return FaaSInvocationIDKey.String(val) |
| 3575 |
} |
| 3576 |
|
| 3577 |
// FaaSInvokedName returns an attribute KeyValue conforming to the |
| 3578 |
// "faas.invoked_name" semantic conventions. It represents the name of the |
| 3579 |
// invoked function. |
| 3580 |
func FaaSInvokedName(val string) attribute.KeyValue { |
| 3581 |
return FaaSInvokedNameKey.String(val) |
| 3582 |
} |
| 3583 |
|
| 3584 |
// FaaSInvokedRegion returns an attribute KeyValue conforming to the |
| 3585 |
// "faas.invoked_region" semantic conventions. It represents the cloud region |
| 3586 |
// of the invoked function. |
| 3587 |
func FaaSInvokedRegion(val string) attribute.KeyValue { |
| 3588 |
return FaaSInvokedRegionKey.String(val) |
| 3589 |
} |
| 3590 |
|
| 3591 |
// FaaSMaxMemory returns an attribute KeyValue conforming to the |
| 3592 |
// "faas.max_memory" semantic conventions. It represents the amount of memory |
| 3593 |
// available to the serverless function converted to Bytes. |
| 3594 |
func FaaSMaxMemory(val int) attribute.KeyValue { |
| 3595 |
return FaaSMaxMemoryKey.Int(val) |
| 3596 |
} |
| 3597 |
|
| 3598 |
// FaaSName returns an attribute KeyValue conforming to the "faas.name" |
| 3599 |
// semantic conventions. It represents the name of the single function that |
| 3600 |
// this runtime instance executes. |
| 3601 |
func FaaSName(val string) attribute.KeyValue { |
| 3602 |
return FaaSNameKey.String(val) |
| 3603 |
} |
| 3604 |
|
| 3605 |
// FaaSTime returns an attribute KeyValue conforming to the "faas.time" |
| 3606 |
// semantic conventions. It represents a string containing the function |
| 3607 |
// invocation time in the [ISO |
| 3608 |
// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format |
| 3609 |
// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). |
| 3610 |
func FaaSTime(val string) attribute.KeyValue { |
| 3611 |
return FaaSTimeKey.String(val) |
| 3612 |
} |
| 3613 |
|
| 3614 |
// FaaSVersion returns an attribute KeyValue conforming to the |
| 3615 |
// "faas.version" semantic conventions. It represents the immutable version of |
| 3616 |
// the function being executed. |
| 3617 |
func FaaSVersion(val string) attribute.KeyValue { |
| 3618 |
return FaaSVersionKey.String(val) |
| 3619 |
} |
| 3620 |
|
| 3621 |
// Attributes for Feature Flags. |
| 3622 |
const ( |
| 3623 |
// FeatureFlagKeyKey is the attribute Key conforming to the |
| 3624 |
// "feature_flag.key" semantic conventions. It represents the unique |
| 3625 |
// identifier of the feature flag. |
| 3626 |
// |
| 3627 |
// Type: string |
| 3628 |
// RequirementLevel: Optional |
| 3629 |
// Stability: experimental |
| 3630 |
// Examples: 'logo-color' |
| 3631 |
FeatureFlagKeyKey = attribute.Key("feature_flag.key") |
| 3632 |
|
| 3633 |
// FeatureFlagProviderNameKey is the attribute Key conforming to the |
| 3634 |
// "feature_flag.provider_name" semantic conventions. It represents the |
| 3635 |
// name of the service provider that performs the flag evaluation. |
| 3636 |
// |
| 3637 |
// Type: string |
| 3638 |
// RequirementLevel: Optional |
| 3639 |
// Stability: experimental |
| 3640 |
// Examples: 'Flag Manager' |
| 3641 |
FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") |
| 3642 |
|
| 3643 |
// FeatureFlagVariantKey is the attribute Key conforming to the |
| 3644 |
// "feature_flag.variant" semantic conventions. It represents the sHOULD be |
| 3645 |
// a semantic identifier for a value. If one is unavailable, a stringified |
| 3646 |
// version of the value can be used. |
| 3647 |
// |
| 3648 |
// Type: string |
| 3649 |
// RequirementLevel: Optional |
| 3650 |
// Stability: experimental |
| 3651 |
// Examples: 'red', 'true', 'on' |
| 3652 |
// Note: A semantic identifier, commonly referred to as a variant, provides |
| 3653 |
// a means |
| 3654 |
// for referring to a value without including the value itself. This can |
| 3655 |
// provide additional context for understanding the meaning behind a value. |
| 3656 |
// For example, the variant `red` maybe be used for the value `#c05543`. |
| 3657 |
// |
| 3658 |
// A stringified version of the value can be used in situations where a |
| 3659 |
// semantic identifier is unavailable. String representation of the value |
| 3660 |
// should be determined by the implementer. |
| 3661 |
FeatureFlagVariantKey = attribute.Key("feature_flag.variant") |
| 3662 |
) |
| 3663 |
|
| 3664 |
// FeatureFlagKey returns an attribute KeyValue conforming to the |
| 3665 |
// "feature_flag.key" semantic conventions. It represents the unique identifier |
| 3666 |
// of the feature flag. |
| 3667 |
func FeatureFlagKey(val string) attribute.KeyValue { |
| 3668 |
return FeatureFlagKeyKey.String(val) |
| 3669 |
} |
| 3670 |
|
| 3671 |
// FeatureFlagProviderName returns an attribute KeyValue conforming to the |
| 3672 |
// "feature_flag.provider_name" semantic conventions. It represents the name of |
| 3673 |
// the service provider that performs the flag evaluation. |
| 3674 |
func FeatureFlagProviderName(val string) attribute.KeyValue { |
| 3675 |
return FeatureFlagProviderNameKey.String(val) |
| 3676 |
} |
| 3677 |
|
| 3678 |
// FeatureFlagVariant returns an attribute KeyValue conforming to the |
| 3679 |
// "feature_flag.variant" semantic conventions. It represents the sHOULD be a |
| 3680 |
// semantic identifier for a value. If one is unavailable, a stringified |
| 3681 |
// version of the value can be used. |
| 3682 |
func FeatureFlagVariant(val string) attribute.KeyValue { |
| 3683 |
return FeatureFlagVariantKey.String(val) |
| 3684 |
} |
| 3685 |
|
| 3686 |
// Describes file attributes. |
| 3687 |
const ( |
| 3688 |
// FileDirectoryKey is the attribute Key conforming to the "file.directory" |
| 3689 |
// semantic conventions. It represents the directory where the file is |
| 3690 |
// located. It should include the drive letter, when appropriate. |
| 3691 |
// |
| 3692 |
// Type: string |
| 3693 |
// RequirementLevel: Optional |
| 3694 |
// Stability: experimental |
| 3695 |
// Examples: '/home/user', 'C:\\Program Files\\MyApp' |
| 3696 |
FileDirectoryKey = attribute.Key("file.directory") |
| 3697 |
|
| 3698 |
// FileExtensionKey is the attribute Key conforming to the "file.extension" |
| 3699 |
// semantic conventions. It represents the file extension, excluding the |
| 3700 |
// leading dot. |
| 3701 |
// |
| 3702 |
// Type: string |
| 3703 |
// RequirementLevel: Optional |
| 3704 |
// Stability: experimental |
| 3705 |
// Examples: 'png', 'gz' |
| 3706 |
// Note: When the file name has multiple extensions (example.tar.gz), only |
| 3707 |
// the last one should be captured ("gz", not "tar.gz"). |
| 3708 |
FileExtensionKey = attribute.Key("file.extension") |
| 3709 |
|
| 3710 |
// FileNameKey is the attribute Key conforming to the "file.name" semantic |
| 3711 |
// conventions. It represents the name of the file including the extension, |
| 3712 |
// without the directory. |
| 3713 |
// |
| 3714 |
// Type: string |
| 3715 |
// RequirementLevel: Optional |
| 3716 |
// Stability: experimental |
| 3717 |
// Examples: 'example.png' |
| 3718 |
FileNameKey = attribute.Key("file.name") |
| 3719 |
|
| 3720 |
// FilePathKey is the attribute Key conforming to the "file.path" semantic |
| 3721 |
// conventions. It represents the full path to the file, including the file |
| 3722 |
// name. It should include the drive letter, when appropriate. |
| 3723 |
// |
| 3724 |
// Type: string |
| 3725 |
// RequirementLevel: Optional |
| 3726 |
// Stability: experimental |
| 3727 |
// Examples: '/home/alice/example.png', 'C:\\Program |
| 3728 |
// Files\\MyApp\\myapp.exe' |
| 3729 |
FilePathKey = attribute.Key("file.path") |
| 3730 |
|
| 3731 |
// FileSizeKey is the attribute Key conforming to the "file.size" semantic |
| 3732 |
// conventions. It represents the file size in bytes. |
| 3733 |
// |
| 3734 |
// Type: int |
| 3735 |
// RequirementLevel: Optional |
| 3736 |
// Stability: experimental |
| 3737 |
FileSizeKey = attribute.Key("file.size") |
| 3738 |
) |
| 3739 |
|
| 3740 |
// FileDirectory returns an attribute KeyValue conforming to the |
| 3741 |
// "file.directory" semantic conventions. It represents the directory where the |
| 3742 |
// file is located. It should include the drive letter, when appropriate. |
| 3743 |
func FileDirectory(val string) attribute.KeyValue { |
| 3744 |
return FileDirectoryKey.String(val) |
| 3745 |
} |
| 3746 |
|
| 3747 |
// FileExtension returns an attribute KeyValue conforming to the |
| 3748 |
// "file.extension" semantic conventions. It represents the file extension, |
| 3749 |
// excluding the leading dot. |
| 3750 |
func FileExtension(val string) attribute.KeyValue { |
| 3751 |
return FileExtensionKey.String(val) |
| 3752 |
} |
| 3753 |
|
| 3754 |
// FileName returns an attribute KeyValue conforming to the "file.name" |
| 3755 |
// semantic conventions. It represents the name of the file including the |
| 3756 |
// extension, without the directory. |
| 3757 |
func FileName(val string) attribute.KeyValue { |
| 3758 |
return FileNameKey.String(val) |
| 3759 |
} |
| 3760 |
|
| 3761 |
// FilePath returns an attribute KeyValue conforming to the "file.path" |
| 3762 |
// semantic conventions. It represents the full path to the file, including the |
| 3763 |
// file name. It should include the drive letter, when appropriate. |
| 3764 |
func FilePath(val string) attribute.KeyValue { |
| 3765 |
return FilePathKey.String(val) |
| 3766 |
} |
| 3767 |
|
| 3768 |
// FileSize returns an attribute KeyValue conforming to the "file.size" |
| 3769 |
// semantic conventions. It represents the file size in bytes. |
| 3770 |
func FileSize(val int) attribute.KeyValue { |
| 3771 |
return FileSizeKey.Int(val) |
| 3772 |
} |
| 3773 |
|
| 3774 |
// Attributes for Google Cloud client libraries. |
| 3775 |
const ( |
| 3776 |
// GCPClientServiceKey is the attribute Key conforming to the |
| 3777 |
// "gcp.client.service" semantic conventions. It represents the identifies |
| 3778 |
// the Google Cloud service for which the official client library is |
| 3779 |
// intended. |
| 3780 |
// |
| 3781 |
// Type: string |
| 3782 |
// RequirementLevel: Optional |
| 3783 |
// Stability: experimental |
| 3784 |
// Examples: 'appengine', 'run', 'firestore', 'alloydb', 'spanner' |
| 3785 |
// Note: Intended to be a stable identifier for Google Cloud client |
| 3786 |
// libraries that is uniform across implementation languages. The value |
| 3787 |
// should be derived from the canonical service domain for the service; for |
| 3788 |
// example, 'foo.googleapis.com' should result in a value of 'foo'. |
| 3789 |
GCPClientServiceKey = attribute.Key("gcp.client.service") |
| 3790 |
) |
| 3791 |
|
| 3792 |
// GCPClientService returns an attribute KeyValue conforming to the |
| 3793 |
// "gcp.client.service" semantic conventions. It represents the identifies the |
| 3794 |
// Google Cloud service for which the official client library is intended. |
| 3795 |
func GCPClientService(val string) attribute.KeyValue { |
| 3796 |
return GCPClientServiceKey.String(val) |
| 3797 |
} |
| 3798 |
|
| 3799 |
// Attributes for Google Cloud Run. |
| 3800 |
const ( |
| 3801 |
// GCPCloudRunJobExecutionKey is the attribute Key conforming to the |
| 3802 |
// "gcp.cloud_run.job.execution" semantic conventions. It represents the |
| 3803 |
// name of the Cloud Run |
| 3804 |
// [execution](https://cloud.google.com/run/docs/managing/job-executions) |
| 3805 |
// being run for the Job, as set by the |
| 3806 |
// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) |
| 3807 |
// environment variable. |
| 3808 |
// |
| 3809 |
// Type: string |
| 3810 |
// RequirementLevel: Optional |
| 3811 |
// Stability: experimental |
| 3812 |
// Examples: 'job-name-xxxx', 'sample-job-mdw84' |
| 3813 |
GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") |
| 3814 |
|
| 3815 |
// GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the |
| 3816 |
// "gcp.cloud_run.job.task_index" semantic conventions. It represents the |
| 3817 |
// index for a task within an execution as provided by the |
| 3818 |
// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) |
| 3819 |
// environment variable. |
| 3820 |
// |
| 3821 |
// Type: int |
| 3822 |
// RequirementLevel: Optional |
| 3823 |
// Stability: experimental |
| 3824 |
// Examples: 0, 1 |
| 3825 |
GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") |
| 3826 |
) |
| 3827 |
|
| 3828 |
// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the |
| 3829 |
// "gcp.cloud_run.job.execution" semantic conventions. It represents the name |
| 3830 |
// of the Cloud Run |
| 3831 |
// [execution](https://cloud.google.com/run/docs/managing/job-executions) being |
| 3832 |
// run for the Job, as set by the |
| 3833 |
// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) |
| 3834 |
// environment variable. |
| 3835 |
func GCPCloudRunJobExecution(val string) attribute.KeyValue { |
| 3836 |
return GCPCloudRunJobExecutionKey.String(val) |
| 3837 |
} |
| 3838 |
|
| 3839 |
// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the |
| 3840 |
// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index |
| 3841 |
// for a task within an execution as provided by the |
| 3842 |
// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) |
| 3843 |
// environment variable. |
| 3844 |
func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { |
| 3845 |
return GCPCloudRunJobTaskIndexKey.Int(val) |
| 3846 |
} |
| 3847 |
|
| 3848 |
// Attributes for Google Compute Engine (GCE). |
| 3849 |
const ( |
| 3850 |
// GCPGceInstanceHostnameKey is the attribute Key conforming to the |
| 3851 |
// "gcp.gce.instance.hostname" semantic conventions. It represents the |
| 3852 |
// hostname of a GCE instance. This is the full value of the default or |
| 3853 |
// [custom |
| 3854 |
// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). |
| 3855 |
// |
| 3856 |
// Type: string |
| 3857 |
// RequirementLevel: Optional |
| 3858 |
// Stability: experimental |
| 3859 |
// Examples: 'my-host1234.example.com', |
| 3860 |
// 'sample-vm.us-west1-b.c.my-project.internal' |
| 3861 |
GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") |
| 3862 |
|
| 3863 |
// GCPGceInstanceNameKey is the attribute Key conforming to the |
| 3864 |
// "gcp.gce.instance.name" semantic conventions. It represents the instance |
| 3865 |
// name of a GCE instance. This is the value provided by `host.name`, the |
| 3866 |
// visible name of the instance in the Cloud Console UI, and the prefix for |
| 3867 |
// the default hostname of the instance as defined by the [default internal |
| 3868 |
// DNS |
| 3869 |
// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). |
| 3870 |
// |
| 3871 |
// Type: string |
| 3872 |
// RequirementLevel: Optional |
| 3873 |
// Stability: experimental |
| 3874 |
// Examples: 'instance-1', 'my-vm-name' |
| 3875 |
GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") |
| 3876 |
) |
| 3877 |
|
| 3878 |
// GCPGceInstanceHostname returns an attribute KeyValue conforming to the |
| 3879 |
// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname |
| 3880 |
// of a GCE instance. This is the full value of the default or [custom |
| 3881 |
// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). |
| 3882 |
func GCPGceInstanceHostname(val string) attribute.KeyValue { |
| 3883 |
return GCPGceInstanceHostnameKey.String(val) |
| 3884 |
} |
| 3885 |
|
| 3886 |
// GCPGceInstanceName returns an attribute KeyValue conforming to the |
| 3887 |
// "gcp.gce.instance.name" semantic conventions. It represents the instance |
| 3888 |
// name of a GCE instance. This is the value provided by `host.name`, the |
| 3889 |
// visible name of the instance in the Cloud Console UI, and the prefix for the |
| 3890 |
// default hostname of the instance as defined by the [default internal DNS |
| 3891 |
// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). |
| 3892 |
func GCPGceInstanceName(val string) attribute.KeyValue { |
| 3893 |
return GCPGceInstanceNameKey.String(val) |
| 3894 |
} |
| 3895 |
|
| 3896 |
// The attributes used to describe telemetry in the context of Generative |
| 3897 |
// Artificial Intelligence (GenAI) Models requests and responses. |
| 3898 |
const ( |
| 3899 |
// GenAICompletionKey is the attribute Key conforming to the |
| 3900 |
// "gen_ai.completion" semantic conventions. It represents the full |
| 3901 |
// response received from the GenAI model. |
| 3902 |
// |
| 3903 |
// Type: string |
| 3904 |
// RequirementLevel: Optional |
| 3905 |
// Stability: experimental |
| 3906 |
// Examples: "[{'role': 'assistant', 'content': 'The capital of France is |
| 3907 |
// Paris.'}]" |
| 3908 |
// Note: It's RECOMMENDED to format completions as JSON string matching |
| 3909 |
// [OpenAI messages |
| 3910 |
// format](https://platform.openai.com/docs/guides/text-generation) |
| 3911 |
GenAICompletionKey = attribute.Key("gen_ai.completion") |
| 3912 |
|
| 3913 |
// GenAIOperationNameKey is the attribute Key conforming to the |
| 3914 |
// "gen_ai.operation.name" semantic conventions. It represents the name of |
| 3915 |
// the operation being performed. |
| 3916 |
// |
| 3917 |
// Type: Enum |
| 3918 |
// RequirementLevel: Optional |
| 3919 |
// Stability: experimental |
| 3920 |
// Note: If one of the predefined values applies, but specific system uses |
| 3921 |
// a different name it's RECOMMENDED to document it in the semantic |
| 3922 |
// conventions for specific GenAI system and use system-specific name in |
| 3923 |
// the instrumentation. If a different name is not documented, |
| 3924 |
// instrumentation libraries SHOULD use applicable predefined value. |
| 3925 |
GenAIOperationNameKey = attribute.Key("gen_ai.operation.name") |
| 3926 |
|
| 3927 |
// GenAIPromptKey is the attribute Key conforming to the "gen_ai.prompt" |
| 3928 |
// semantic conventions. It represents the full prompt sent to the GenAI |
| 3929 |
// model. |
| 3930 |
// |
| 3931 |
// Type: string |
| 3932 |
// RequirementLevel: Optional |
| 3933 |
// Stability: experimental |
| 3934 |
// Examples: "[{'role': 'user', 'content': 'What is the capital of |
| 3935 |
// France?'}]" |
| 3936 |
// Note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI |
| 3937 |
// messages |
| 3938 |
// format](https://platform.openai.com/docs/guides/text-generation) |
| 3939 |
GenAIPromptKey = attribute.Key("gen_ai.prompt") |
| 3940 |
|
| 3941 |
// GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the |
| 3942 |
// "gen_ai.request.frequency_penalty" semantic conventions. It represents |
| 3943 |
// the frequency penalty setting for the GenAI request. |
| 3944 |
// |
| 3945 |
// Type: double |
| 3946 |
// RequirementLevel: Optional |
| 3947 |
// Stability: experimental |
| 3948 |
// Examples: 0.1 |
| 3949 |
GenAIRequestFrequencyPenaltyKey = attribute.Key("gen_ai.request.frequency_penalty") |
| 3950 |
|
| 3951 |
// GenAIRequestMaxTokensKey is the attribute Key conforming to the |
| 3952 |
// "gen_ai.request.max_tokens" semantic conventions. It represents the |
| 3953 |
// maximum number of tokens the model generates for a request. |
| 3954 |
// |
| 3955 |
// Type: int |
| 3956 |
// RequirementLevel: Optional |
| 3957 |
// Stability: experimental |
| 3958 |
// Examples: 100 |
| 3959 |
GenAIRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens") |
| 3960 |
|
| 3961 |
// GenAIRequestModelKey is the attribute Key conforming to the |
| 3962 |
// "gen_ai.request.model" semantic conventions. It represents the name of |
| 3963 |
// the GenAI model a request is being made to. |
| 3964 |
// |
| 3965 |
// Type: string |
| 3966 |
// RequirementLevel: Optional |
| 3967 |
// Stability: experimental |
| 3968 |
// Examples: 'gpt-4' |
| 3969 |
GenAIRequestModelKey = attribute.Key("gen_ai.request.model") |
| 3970 |
|
| 3971 |
// GenAIRequestPresencePenaltyKey is the attribute Key conforming to the |
| 3972 |
// "gen_ai.request.presence_penalty" semantic conventions. It represents |
| 3973 |
// the presence penalty setting for the GenAI request. |
| 3974 |
// |
| 3975 |
// Type: double |
| 3976 |
// RequirementLevel: Optional |
| 3977 |
// Stability: experimental |
| 3978 |
// Examples: 0.1 |
| 3979 |
GenAIRequestPresencePenaltyKey = attribute.Key("gen_ai.request.presence_penalty") |
| 3980 |
|
| 3981 |
// GenAIRequestStopSequencesKey is the attribute Key conforming to the |
| 3982 |
// "gen_ai.request.stop_sequences" semantic conventions. It represents the |
| 3983 |
// list of sequences that the model will use to stop generating further |
| 3984 |
// tokens. |
| 3985 |
// |
| 3986 |
// Type: string[] |
| 3987 |
// RequirementLevel: Optional |
| 3988 |
// Stability: experimental |
| 3989 |
// Examples: 'forest', 'lived' |
| 3990 |
GenAIRequestStopSequencesKey = attribute.Key("gen_ai.request.stop_sequences") |
| 3991 |
|
| 3992 |
// GenAIRequestTemperatureKey is the attribute Key conforming to the |
| 3993 |
// "gen_ai.request.temperature" semantic conventions. It represents the |
| 3994 |
// temperature setting for the GenAI request. |
| 3995 |
// |
| 3996 |
// Type: double |
| 3997 |
// RequirementLevel: Optional |
| 3998 |
// Stability: experimental |
| 3999 |
// Examples: 0.0 |
| 4000 |
GenAIRequestTemperatureKey = attribute.Key("gen_ai.request.temperature") |
| 4001 |
|
| 4002 |
// GenAIRequestTopKKey is the attribute Key conforming to the |
| 4003 |
// "gen_ai.request.top_k" semantic conventions. It represents the top_k |
| 4004 |
// sampling setting for the GenAI request. |
| 4005 |
// |
| 4006 |
// Type: double |
| 4007 |
// RequirementLevel: Optional |
| 4008 |
// Stability: experimental |
| 4009 |
// Examples: 1.0 |
| 4010 |
GenAIRequestTopKKey = attribute.Key("gen_ai.request.top_k") |
| 4011 |
|
| 4012 |
// GenAIRequestTopPKey is the attribute Key conforming to the |
| 4013 |
// "gen_ai.request.top_p" semantic conventions. It represents the top_p |
| 4014 |
// sampling setting for the GenAI request. |
| 4015 |
// |
| 4016 |
// Type: double |
| 4017 |
// RequirementLevel: Optional |
| 4018 |
// Stability: experimental |
| 4019 |
// Examples: 1.0 |
| 4020 |
GenAIRequestTopPKey = attribute.Key("gen_ai.request.top_p") |
| 4021 |
|
| 4022 |
// GenAIResponseFinishReasonsKey is the attribute Key conforming to the |
| 4023 |
// "gen_ai.response.finish_reasons" semantic conventions. It represents the |
| 4024 |
// array of reasons the model stopped generating tokens, corresponding to |
| 4025 |
// each generation received. |
| 4026 |
// |
| 4027 |
// Type: string[] |
| 4028 |
// RequirementLevel: Optional |
| 4029 |
// Stability: experimental |
| 4030 |
// Examples: 'stop' |
| 4031 |
GenAIResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons") |
| 4032 |
|
| 4033 |
// GenAIResponseIDKey is the attribute Key conforming to the |
| 4034 |
// "gen_ai.response.id" semantic conventions. It represents the unique |
| 4035 |
// identifier for the completion. |
| 4036 |
// |
| 4037 |
// Type: string |
| 4038 |
// RequirementLevel: Optional |
| 4039 |
// Stability: experimental |
| 4040 |
// Examples: 'chatcmpl-123' |
| 4041 |
GenAIResponseIDKey = attribute.Key("gen_ai.response.id") |
| 4042 |
|
| 4043 |
// GenAIResponseModelKey is the attribute Key conforming to the |
| 4044 |
// "gen_ai.response.model" semantic conventions. It represents the name of |
| 4045 |
// the model that generated the response. |
| 4046 |
// |
| 4047 |
// Type: string |
| 4048 |
// RequirementLevel: Optional |
| 4049 |
// Stability: experimental |
| 4050 |
// Examples: 'gpt-4-0613' |
| 4051 |
GenAIResponseModelKey = attribute.Key("gen_ai.response.model") |
| 4052 |
|
| 4053 |
// GenAISystemKey is the attribute Key conforming to the "gen_ai.system" |
| 4054 |
// semantic conventions. It represents the Generative AI product as |
| 4055 |
// identified by the client or server instrumentation. |
| 4056 |
// |
| 4057 |
// Type: Enum |
| 4058 |
// RequirementLevel: Optional |
| 4059 |
// Stability: experimental |
| 4060 |
// Examples: 'openai' |
| 4061 |
// Note: The `gen_ai.system` describes a family of GenAI models with |
| 4062 |
// specific model identified |
| 4063 |
// by `gen_ai.request.model` and `gen_ai.response.model` attributes. |
| 4064 |
// |
| 4065 |
// The actual GenAI product may differ from the one identified by the |
| 4066 |
// client. |
| 4067 |
// For example, when using OpenAI client libraries to communicate with |
| 4068 |
// Mistral, the `gen_ai.system` |
| 4069 |
// is set to `openai` based on the instrumentation's best knowledge. |
| 4070 |
// |
| 4071 |
// For custom model, a custom friendly name SHOULD be used. |
| 4072 |
// If none of these options apply, the `gen_ai.system` SHOULD be set to |
| 4073 |
// `_OTHER`. |
| 4074 |
GenAISystemKey = attribute.Key("gen_ai.system") |
| 4075 |
|
| 4076 |
// GenAITokenTypeKey is the attribute Key conforming to the |
| 4077 |
// "gen_ai.token.type" semantic conventions. It represents the type of |
| 4078 |
// token being counted. |
| 4079 |
// |
| 4080 |
// Type: Enum |
| 4081 |
// RequirementLevel: Optional |
| 4082 |
// Stability: experimental |
| 4083 |
// Examples: 'input', 'output' |
| 4084 |
GenAITokenTypeKey = attribute.Key("gen_ai.token.type") |
| 4085 |
|
| 4086 |
// GenAIUsageInputTokensKey is the attribute Key conforming to the |
| 4087 |
// "gen_ai.usage.input_tokens" semantic conventions. It represents the |
| 4088 |
// number of tokens used in the GenAI input (prompt). |
| 4089 |
// |
| 4090 |
// Type: int |
| 4091 |
// RequirementLevel: Optional |
| 4092 |
// Stability: experimental |
| 4093 |
// Examples: 100 |
| 4094 |
GenAIUsageInputTokensKey = attribute.Key("gen_ai.usage.input_tokens") |
| 4095 |
|
| 4096 |
// GenAIUsageOutputTokensKey is the attribute Key conforming to the |
| 4097 |
// "gen_ai.usage.output_tokens" semantic conventions. It represents the |
| 4098 |
// number of tokens used in the GenAI response (completion). |
| 4099 |
// |
| 4100 |
// Type: int |
| 4101 |
// RequirementLevel: Optional |
| 4102 |
// Stability: experimental |
| 4103 |
// Examples: 180 |
| 4104 |
GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens") |
| 4105 |
) |
| 4106 |
|
| 4107 |
var ( |
| 4108 |
// Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) |
| 4109 |
GenAIOperationNameChat = GenAIOperationNameKey.String("chat") |
| 4110 |
// Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions) |
| 4111 |
GenAIOperationNameTextCompletion = GenAIOperationNameKey.String("text_completion") |
| 4112 |
) |
| 4113 |
|
| 4114 |
var ( |
| 4115 |
// OpenAI |
| 4116 |
GenAISystemOpenai = GenAISystemKey.String("openai") |
| 4117 |
// Vertex AI |
| 4118 |
GenAISystemVertexAI = GenAISystemKey.String("vertex_ai") |
| 4119 |
// Anthropic |
| 4120 |
GenAISystemAnthropic = GenAISystemKey.String("anthropic") |
| 4121 |
// Cohere |
| 4122 |
GenAISystemCohere = GenAISystemKey.String("cohere") |
| 4123 |
) |
| 4124 |
|
| 4125 |
var ( |
| 4126 |
// Input tokens (prompt, input, etc.) |
| 4127 |
GenAITokenTypeInput = GenAITokenTypeKey.String("input") |
| 4128 |
// Output tokens (completion, response, etc.) |
| 4129 |
GenAITokenTypeCompletion = GenAITokenTypeKey.String("output") |
| 4130 |
) |
| 4131 |
|
| 4132 |
// GenAICompletion returns an attribute KeyValue conforming to the |
| 4133 |
// "gen_ai.completion" semantic conventions. It represents the full response |
| 4134 |
// received from the GenAI model. |
| 4135 |
func GenAICompletion(val string) attribute.KeyValue { |
| 4136 |
return GenAICompletionKey.String(val) |
| 4137 |
} |
| 4138 |
|
| 4139 |
// GenAIPrompt returns an attribute KeyValue conforming to the |
| 4140 |
// "gen_ai.prompt" semantic conventions. It represents the full prompt sent to |
| 4141 |
// the GenAI model. |
| 4142 |
func GenAIPrompt(val string) attribute.KeyValue { |
| 4143 |
return GenAIPromptKey.String(val) |
| 4144 |
} |
| 4145 |
|
| 4146 |
// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to |
| 4147 |
// the "gen_ai.request.frequency_penalty" semantic conventions. It represents |
| 4148 |
// the frequency penalty setting for the GenAI request. |
| 4149 |
func GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue { |
| 4150 |
return GenAIRequestFrequencyPenaltyKey.Float64(val) |
| 4151 |
} |
| 4152 |
|
| 4153 |
// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the |
| 4154 |
// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum |
| 4155 |
// number of tokens the model generates for a request. |
| 4156 |
func GenAIRequestMaxTokens(val int) attribute.KeyValue { |
| 4157 |
return GenAIRequestMaxTokensKey.Int(val) |
| 4158 |
} |
| 4159 |
|
| 4160 |
// GenAIRequestModel returns an attribute KeyValue conforming to the |
| 4161 |
// "gen_ai.request.model" semantic conventions. It represents the name of the |
| 4162 |
// GenAI model a request is being made to. |
| 4163 |
func GenAIRequestModel(val string) attribute.KeyValue { |
| 4164 |
return GenAIRequestModelKey.String(val) |
| 4165 |
} |
| 4166 |
|
| 4167 |
// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to |
| 4168 |
// the "gen_ai.request.presence_penalty" semantic conventions. It represents |
| 4169 |
// the presence penalty setting for the GenAI request. |
| 4170 |
func GenAIRequestPresencePenalty(val float64) attribute.KeyValue { |
| 4171 |
return GenAIRequestPresencePenaltyKey.Float64(val) |
| 4172 |
} |
| 4173 |
|
| 4174 |
// GenAIRequestStopSequences returns an attribute KeyValue conforming to the |
| 4175 |
// "gen_ai.request.stop_sequences" semantic conventions. It represents the list |
| 4176 |
// of sequences that the model will use to stop generating further tokens. |
| 4177 |
func GenAIRequestStopSequences(val ...string) attribute.KeyValue { |
| 4178 |
return GenAIRequestStopSequencesKey.StringSlice(val) |
| 4179 |
} |
| 4180 |
|
| 4181 |
// GenAIRequestTemperature returns an attribute KeyValue conforming to the |
| 4182 |
// "gen_ai.request.temperature" semantic conventions. It represents the |
| 4183 |
// temperature setting for the GenAI request. |
| 4184 |
func GenAIRequestTemperature(val float64) attribute.KeyValue { |
| 4185 |
return GenAIRequestTemperatureKey.Float64(val) |
| 4186 |
} |
| 4187 |
|
| 4188 |
// GenAIRequestTopK returns an attribute KeyValue conforming to the |
| 4189 |
// "gen_ai.request.top_k" semantic conventions. It represents the top_k |
| 4190 |
// sampling setting for the GenAI request. |
| 4191 |
func GenAIRequestTopK(val float64) attribute.KeyValue { |
| 4192 |
return GenAIRequestTopKKey.Float64(val) |
| 4193 |
} |
| 4194 |
|
| 4195 |
// GenAIRequestTopP returns an attribute KeyValue conforming to the |
| 4196 |
// "gen_ai.request.top_p" semantic conventions. It represents the top_p |
| 4197 |
// sampling setting for the GenAI request. |
| 4198 |
func GenAIRequestTopP(val float64) attribute.KeyValue { |
| 4199 |
return GenAIRequestTopPKey.Float64(val) |
| 4200 |
} |
| 4201 |
|
| 4202 |
// GenAIResponseFinishReasons returns an attribute KeyValue conforming to |
| 4203 |
// the "gen_ai.response.finish_reasons" semantic conventions. It represents the |
| 4204 |
// array of reasons the model stopped generating tokens, corresponding to each |
| 4205 |
// generation received. |
| 4206 |
func GenAIResponseFinishReasons(val ...string) attribute.KeyValue { |
| 4207 |
return GenAIResponseFinishReasonsKey.StringSlice(val) |
| 4208 |
} |
| 4209 |
|
| 4210 |
// GenAIResponseID returns an attribute KeyValue conforming to the |
| 4211 |
// "gen_ai.response.id" semantic conventions. It represents the unique |
| 4212 |
// identifier for the completion. |
| 4213 |
func GenAIResponseID(val string) attribute.KeyValue { |
| 4214 |
return GenAIResponseIDKey.String(val) |
| 4215 |
} |
| 4216 |
|
| 4217 |
// GenAIResponseModel returns an attribute KeyValue conforming to the |
| 4218 |
// "gen_ai.response.model" semantic conventions. It represents the name of the |
| 4219 |
// model that generated the response. |
| 4220 |
func GenAIResponseModel(val string) attribute.KeyValue { |
| 4221 |
return GenAIResponseModelKey.String(val) |
| 4222 |
} |
| 4223 |
|
| 4224 |
// GenAIUsageInputTokens returns an attribute KeyValue conforming to the |
| 4225 |
// "gen_ai.usage.input_tokens" semantic conventions. It represents the number |
| 4226 |
// of tokens used in the GenAI input (prompt). |
| 4227 |
func GenAIUsageInputTokens(val int) attribute.KeyValue { |
| 4228 |
return GenAIUsageInputTokensKey.Int(val) |
| 4229 |
} |
| 4230 |
|
| 4231 |
// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the |
| 4232 |
// "gen_ai.usage.output_tokens" semantic conventions. It represents the number |
| 4233 |
// of tokens used in the GenAI response (completion). |
| 4234 |
func GenAIUsageOutputTokens(val int) attribute.KeyValue { |
| 4235 |
return GenAIUsageOutputTokensKey.Int(val) |
| 4236 |
} |
| 4237 |
|
| 4238 |
// Go related attributes. |
| 4239 |
const ( |
| 4240 |
// GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type" |
| 4241 |
// semantic conventions. It represents the type of memory. |
| 4242 |
// |
| 4243 |
// Type: Enum |
| 4244 |
// RequirementLevel: Recommended |
| 4245 |
// Stability: experimental |
| 4246 |
// Examples: 'other', 'stack' |
| 4247 |
GoMemoryTypeKey = attribute.Key("go.memory.type") |
| 4248 |
) |
| 4249 |
|
| 4250 |
var ( |
| 4251 |
// Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use |
| 4252 |
GoMemoryTypeStack = GoMemoryTypeKey.String("stack") |
| 4253 |
// Memory used by the Go runtime, excluding other categories of memory usage described in this enumeration |
| 4254 |
GoMemoryTypeOther = GoMemoryTypeKey.String("other") |
| 4255 |
) |
| 4256 |
|
| 4257 |
// Attributes for GraphQL. |
| 4258 |
const ( |
| 4259 |
// GraphqlDocumentKey is the attribute Key conforming to the |
| 4260 |
// "graphql.document" semantic conventions. It represents the GraphQL |
| 4261 |
// document being executed. |
| 4262 |
// |
| 4263 |
// Type: string |
| 4264 |
// RequirementLevel: Optional |
| 4265 |
// Stability: experimental |
| 4266 |
// Examples: 'query findBookByID { bookByID(id: ?) { name } }' |
| 4267 |
// Note: The value may be sanitized to exclude sensitive information. |
| 4268 |
GraphqlDocumentKey = attribute.Key("graphql.document") |
| 4269 |
|
| 4270 |
// GraphqlOperationNameKey is the attribute Key conforming to the |
| 4271 |
// "graphql.operation.name" semantic conventions. It represents the name of |
| 4272 |
// the operation being executed. |
| 4273 |
// |
| 4274 |
// Type: string |
| 4275 |
// RequirementLevel: Optional |
| 4276 |
// Stability: experimental |
| 4277 |
// Examples: 'findBookByID' |
| 4278 |
GraphqlOperationNameKey = attribute.Key("graphql.operation.name") |
| 4279 |
|
| 4280 |
// GraphqlOperationTypeKey is the attribute Key conforming to the |
| 4281 |
// "graphql.operation.type" semantic conventions. It represents the type of |
| 4282 |
// the operation being executed. |
| 4283 |
// |
| 4284 |
// Type: Enum |
| 4285 |
// RequirementLevel: Optional |
| 4286 |
// Stability: experimental |
| 4287 |
// Examples: 'query', 'mutation', 'subscription' |
| 4288 |
GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") |
| 4289 |
) |
| 4290 |
|
| 4291 |
var ( |
| 4292 |
// GraphQL query |
| 4293 |
GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") |
| 4294 |
// GraphQL mutation |
| 4295 |
GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") |
| 4296 |
// GraphQL subscription |
| 4297 |
GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") |
| 4298 |
) |
| 4299 |
|
| 4300 |
// GraphqlDocument returns an attribute KeyValue conforming to the |
| 4301 |
// "graphql.document" semantic conventions. It represents the GraphQL document |
| 4302 |
// being executed. |
| 4303 |
func GraphqlDocument(val string) attribute.KeyValue { |
| 4304 |
return GraphqlDocumentKey.String(val) |
| 4305 |
} |
| 4306 |
|
| 4307 |
// GraphqlOperationName returns an attribute KeyValue conforming to the |
| 4308 |
// "graphql.operation.name" semantic conventions. It represents the name of the |
| 4309 |
// operation being executed. |
| 4310 |
func GraphqlOperationName(val string) attribute.KeyValue { |
| 4311 |
return GraphqlOperationNameKey.String(val) |
| 4312 |
} |
| 4313 |
|
| 4314 |
// Attributes for the Android platform on which the Android application is |
| 4315 |
// running. |
| 4316 |
const ( |
| 4317 |
// HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" |
| 4318 |
// semantic conventions. It represents the unique identifier for the |
| 4319 |
// application |
| 4320 |
// |
| 4321 |
// Type: string |
| 4322 |
// RequirementLevel: Optional |
| 4323 |
// Stability: experimental |
| 4324 |
// Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' |
| 4325 |
HerokuAppIDKey = attribute.Key("heroku.app.id") |
| 4326 |
|
| 4327 |
// HerokuReleaseCommitKey is the attribute Key conforming to the |
| 4328 |
// "heroku.release.commit" semantic conventions. It represents the commit |
| 4329 |
// hash for the current release |
| 4330 |
// |
| 4331 |
// Type: string |
| 4332 |
// RequirementLevel: Optional |
| 4333 |
// Stability: experimental |
| 4334 |
// Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' |
| 4335 |
HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") |
| 4336 |
|
| 4337 |
// HerokuReleaseCreationTimestampKey is the attribute Key conforming to the |
| 4338 |
// "heroku.release.creation_timestamp" semantic conventions. It represents |
| 4339 |
// the time and date the release was created |
| 4340 |
// |
| 4341 |
// Type: string |
| 4342 |
// RequirementLevel: Optional |
| 4343 |
// Stability: experimental |
| 4344 |
// Examples: '2022-10-23T18:00:42Z' |
| 4345 |
HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") |
| 4346 |
) |
| 4347 |
|
| 4348 |
// HerokuAppID returns an attribute KeyValue conforming to the |
| 4349 |
// "heroku.app.id" semantic conventions. It represents the unique identifier |
| 4350 |
// for the application |
| 4351 |
func HerokuAppID(val string) attribute.KeyValue { |
| 4352 |
return HerokuAppIDKey.String(val) |
| 4353 |
} |
| 4354 |
|
| 4355 |
// HerokuReleaseCommit returns an attribute KeyValue conforming to the |
| 4356 |
// "heroku.release.commit" semantic conventions. It represents the commit hash |
| 4357 |
// for the current release |
| 4358 |
func HerokuReleaseCommit(val string) attribute.KeyValue { |
| 4359 |
return HerokuReleaseCommitKey.String(val) |
| 4360 |
} |
| 4361 |
|
| 4362 |
// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming |
| 4363 |
// to the "heroku.release.creation_timestamp" semantic conventions. It |
| 4364 |
// represents the time and date the release was created |
| 4365 |
func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { |
| 4366 |
return HerokuReleaseCreationTimestampKey.String(val) |
| 4367 |
} |
| 4368 |
|
| 4369 |
// A host is defined as a computing instance. For example, physical servers, |
| 4370 |
// virtual machines, switches or disk array. |
| 4371 |
const ( |
| 4372 |
// HostArchKey is the attribute Key conforming to the "host.arch" semantic |
| 4373 |
// conventions. It represents the CPU architecture the host system is |
| 4374 |
// running on. |
| 4375 |
// |
| 4376 |
// Type: Enum |
| 4377 |
// RequirementLevel: Optional |
| 4378 |
// Stability: experimental |
| 4379 |
HostArchKey = attribute.Key("host.arch") |
| 4380 |
|
| 4381 |
// HostCPUCacheL2SizeKey is the attribute Key conforming to the |
| 4382 |
// "host.cpu.cache.l2.size" semantic conventions. It represents the amount |
| 4383 |
// of level 2 memory cache available to the processor (in Bytes). |
| 4384 |
// |
| 4385 |
// Type: int |
| 4386 |
// RequirementLevel: Optional |
| 4387 |
// Stability: experimental |
| 4388 |
// Examples: 12288000 |
| 4389 |
HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size") |
| 4390 |
|
| 4391 |
// HostCPUFamilyKey is the attribute Key conforming to the |
| 4392 |
// "host.cpu.family" semantic conventions. It represents the family or |
| 4393 |
// generation of the CPU. |
| 4394 |
// |
| 4395 |
// Type: string |
| 4396 |
// RequirementLevel: Optional |
| 4397 |
// Stability: experimental |
| 4398 |
// Examples: '6', 'PA-RISC 1.1e' |
| 4399 |
HostCPUFamilyKey = attribute.Key("host.cpu.family") |
| 4400 |
|
| 4401 |
// HostCPUModelIDKey is the attribute Key conforming to the |
| 4402 |
// "host.cpu.model.id" semantic conventions. It represents the model |
| 4403 |
// identifier. It provides more granular information about the CPU, |
| 4404 |
// distinguishing it from other CPUs within the same family. |
| 4405 |
// |
| 4406 |
// Type: string |
| 4407 |
// RequirementLevel: Optional |
| 4408 |
// Stability: experimental |
| 4409 |
// Examples: '6', '9000/778/B180L' |
| 4410 |
HostCPUModelIDKey = attribute.Key("host.cpu.model.id") |
| 4411 |
|
| 4412 |
// HostCPUModelNameKey is the attribute Key conforming to the |
| 4413 |
// "host.cpu.model.name" semantic conventions. It represents the model |
| 4414 |
// designation of the processor. |
| 4415 |
// |
| 4416 |
// Type: string |
| 4417 |
// RequirementLevel: Optional |
| 4418 |
// Stability: experimental |
| 4419 |
// Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' |
| 4420 |
HostCPUModelNameKey = attribute.Key("host.cpu.model.name") |
| 4421 |
|
| 4422 |
// HostCPUSteppingKey is the attribute Key conforming to the |
| 4423 |
// "host.cpu.stepping" semantic conventions. It represents the stepping or |
| 4424 |
// core revisions. |
| 4425 |
// |
| 4426 |
// Type: string |
| 4427 |
// RequirementLevel: Optional |
| 4428 |
// Stability: experimental |
| 4429 |
// Examples: '1', 'r1p1' |
| 4430 |
HostCPUSteppingKey = attribute.Key("host.cpu.stepping") |
| 4431 |
|
| 4432 |
// HostCPUVendorIDKey is the attribute Key conforming to the |
| 4433 |
// "host.cpu.vendor.id" semantic conventions. It represents the processor |
| 4434 |
// manufacturer identifier. A maximum 12-character string. |
| 4435 |
// |
| 4436 |
// Type: string |
| 4437 |
// RequirementLevel: Optional |
| 4438 |
// Stability: experimental |
| 4439 |
// Examples: 'GenuineIntel' |
| 4440 |
// Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor |
| 4441 |
// ID string in EBX, EDX and ECX registers. Writing these to memory in this |
| 4442 |
// order results in a 12-character string. |
| 4443 |
HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id") |
| 4444 |
|
| 4445 |
// HostIDKey is the attribute Key conforming to the "host.id" semantic |
| 4446 |
// conventions. It represents the unique host ID. For Cloud, this must be |
| 4447 |
// the instance_id assigned by the cloud provider. For non-containerized |
| 4448 |
// systems, this should be the `machine-id`. See the table below for the |
| 4449 |
// sources to use to determine the `machine-id` based on operating system. |
| 4450 |
// |
| 4451 |
// Type: string |
| 4452 |
// RequirementLevel: Optional |
| 4453 |
// Stability: experimental |
| 4454 |
// Examples: 'fdbf79e8af94cb7f9e8df36789187052' |
| 4455 |
HostIDKey = attribute.Key("host.id") |
| 4456 |
|
| 4457 |
// HostImageIDKey is the attribute Key conforming to the "host.image.id" |
| 4458 |
// semantic conventions. It represents the vM image ID or host OS image ID. |
| 4459 |
// For Cloud, this value is from the provider. |
| 4460 |
// |
| 4461 |
// Type: string |
| 4462 |
// RequirementLevel: Optional |
| 4463 |
// Stability: experimental |
| 4464 |
// Examples: 'ami-07b06b442921831e5' |
| 4465 |
HostImageIDKey = attribute.Key("host.image.id") |
| 4466 |
|
| 4467 |
// HostImageNameKey is the attribute Key conforming to the |
| 4468 |
// "host.image.name" semantic conventions. It represents the name of the VM |
| 4469 |
// image or OS install the host was instantiated from. |
| 4470 |
// |
| 4471 |
// Type: string |
| 4472 |
// RequirementLevel: Optional |
| 4473 |
// Stability: experimental |
| 4474 |
// Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' |
| 4475 |
HostImageNameKey = attribute.Key("host.image.name") |
| 4476 |
|
| 4477 |
// HostImageVersionKey is the attribute Key conforming to the |
| 4478 |
// "host.image.version" semantic conventions. It represents the version |
| 4479 |
// string of the VM image or host OS as defined in [Version |
| 4480 |
// Attributes](/docs/resource/README.md#version-attributes). |
| 4481 |
// |
| 4482 |
// Type: string |
| 4483 |
// RequirementLevel: Optional |
| 4484 |
// Stability: experimental |
| 4485 |
// Examples: '0.1' |
| 4486 |
HostImageVersionKey = attribute.Key("host.image.version") |
| 4487 |
|
| 4488 |
// HostIPKey is the attribute Key conforming to the "host.ip" semantic |
| 4489 |
// conventions. It represents the available IP addresses of the host, |
| 4490 |
// excluding loopback interfaces. |
| 4491 |
// |
| 4492 |
// Type: string[] |
| 4493 |
// RequirementLevel: Optional |
| 4494 |
// Stability: experimental |
| 4495 |
// Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' |
| 4496 |
// Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 |
| 4497 |
// addresses MUST be specified in the [RFC |
| 4498 |
// 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. |
| 4499 |
HostIPKey = attribute.Key("host.ip") |
| 4500 |
|
| 4501 |
// HostMacKey is the attribute Key conforming to the "host.mac" semantic |
| 4502 |
// conventions. It represents the available MAC addresses of the host, |
| 4503 |
// excluding loopback interfaces. |
| 4504 |
// |
| 4505 |
// Type: string[] |
| 4506 |
// RequirementLevel: Optional |
| 4507 |
// Stability: experimental |
| 4508 |
// Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' |
| 4509 |
// Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal |
| 4510 |
// form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): |
| 4511 |
// as hyphen-separated octets in uppercase hexadecimal form from most to |
| 4512 |
// least significant. |
| 4513 |
HostMacKey = attribute.Key("host.mac") |
| 4514 |
|
| 4515 |
// HostNameKey is the attribute Key conforming to the "host.name" semantic |
| 4516 |
// conventions. It represents the name of the host. On Unix systems, it may |
| 4517 |
// contain what the hostname command returns, or the fully qualified |
| 4518 |
// hostname, or another name specified by the user. |
| 4519 |
// |
| 4520 |
// Type: string |
| 4521 |
// RequirementLevel: Optional |
| 4522 |
// Stability: experimental |
| 4523 |
// Examples: 'opentelemetry-test' |
| 4524 |
HostNameKey = attribute.Key("host.name") |
| 4525 |
|
| 4526 |
// HostTypeKey is the attribute Key conforming to the "host.type" semantic |
| 4527 |
// conventions. It represents the type of host. For Cloud, this must be the |
| 4528 |
// machine type. |
| 4529 |
// |
| 4530 |
// Type: string |
| 4531 |
// RequirementLevel: Optional |
| 4532 |
// Stability: experimental |
| 4533 |
// Examples: 'n1-standard-1' |
| 4534 |
HostTypeKey = attribute.Key("host.type") |
| 4535 |
) |
| 4536 |
|
| 4537 |
var ( |
| 4538 |
// AMD64 |
| 4539 |
HostArchAMD64 = HostArchKey.String("amd64") |
| 4540 |
// ARM32 |
| 4541 |
HostArchARM32 = HostArchKey.String("arm32") |
| 4542 |
// ARM64 |
| 4543 |
HostArchARM64 = HostArchKey.String("arm64") |
| 4544 |
// Itanium |
| 4545 |
HostArchIA64 = HostArchKey.String("ia64") |
| 4546 |
// 32-bit PowerPC |
| 4547 |
HostArchPPC32 = HostArchKey.String("ppc32") |
| 4548 |
// 64-bit PowerPC |
| 4549 |
HostArchPPC64 = HostArchKey.String("ppc64") |
| 4550 |
// IBM z/Architecture |
| 4551 |
HostArchS390x = HostArchKey.String("s390x") |
| 4552 |
// 32-bit x86 |
| 4553 |
HostArchX86 = HostArchKey.String("x86") |
| 4554 |
) |
| 4555 |
|
| 4556 |
// HostCPUCacheL2Size returns an attribute KeyValue conforming to the |
| 4557 |
// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of |
| 4558 |
// level 2 memory cache available to the processor (in Bytes). |
| 4559 |
func HostCPUCacheL2Size(val int) attribute.KeyValue { |
| 4560 |
return HostCPUCacheL2SizeKey.Int(val) |
| 4561 |
} |
| 4562 |
|
| 4563 |
// HostCPUFamily returns an attribute KeyValue conforming to the |
| 4564 |
// "host.cpu.family" semantic conventions. It represents the family or |
| 4565 |
// generation of the CPU. |
| 4566 |
func HostCPUFamily(val string) attribute.KeyValue { |
| 4567 |
return HostCPUFamilyKey.String(val) |
| 4568 |
} |
| 4569 |
|
| 4570 |
// HostCPUModelID returns an attribute KeyValue conforming to the |
| 4571 |
// "host.cpu.model.id" semantic conventions. It represents the model |
| 4572 |
// identifier. It provides more granular information about the CPU, |
| 4573 |
// distinguishing it from other CPUs within the same family. |
| 4574 |
func HostCPUModelID(val string) attribute.KeyValue { |
| 4575 |
return HostCPUModelIDKey.String(val) |
| 4576 |
} |
| 4577 |
|
| 4578 |
// HostCPUModelName returns an attribute KeyValue conforming to the |
| 4579 |
// "host.cpu.model.name" semantic conventions. It represents the model |
| 4580 |
// designation of the processor. |
| 4581 |
func HostCPUModelName(val string) attribute.KeyValue { |
| 4582 |
return HostCPUModelNameKey.String(val) |
| 4583 |
} |
| 4584 |
|
| 4585 |
// HostCPUStepping returns an attribute KeyValue conforming to the |
| 4586 |
// "host.cpu.stepping" semantic conventions. It represents the stepping or core |
| 4587 |
// revisions. |
| 4588 |
func HostCPUStepping(val string) attribute.KeyValue { |
| 4589 |
return HostCPUSteppingKey.String(val) |
| 4590 |
} |
| 4591 |
|
| 4592 |
// HostCPUVendorID returns an attribute KeyValue conforming to the |
| 4593 |
// "host.cpu.vendor.id" semantic conventions. It represents the processor |
| 4594 |
// manufacturer identifier. A maximum 12-character string. |
| 4595 |
func HostCPUVendorID(val string) attribute.KeyValue { |
| 4596 |
return HostCPUVendorIDKey.String(val) |
| 4597 |
} |
| 4598 |
|
| 4599 |
// HostID returns an attribute KeyValue conforming to the "host.id" semantic |
| 4600 |
// conventions. It represents the unique host ID. For Cloud, this must be the |
| 4601 |
// instance_id assigned by the cloud provider. For non-containerized systems, |
| 4602 |
// this should be the `machine-id`. See the table below for the sources to use |
| 4603 |
// to determine the `machine-id` based on operating system. |
| 4604 |
func HostID(val string) attribute.KeyValue { |
| 4605 |
return HostIDKey.String(val) |
| 4606 |
} |
| 4607 |
|
| 4608 |
// HostImageID returns an attribute KeyValue conforming to the |
| 4609 |
// "host.image.id" semantic conventions. It represents the vM image ID or host |
| 4610 |
// OS image ID. For Cloud, this value is from the provider. |
| 4611 |
func HostImageID(val string) attribute.KeyValue { |
| 4612 |
return HostImageIDKey.String(val) |
| 4613 |
} |
| 4614 |
|
| 4615 |
// HostImageName returns an attribute KeyValue conforming to the |
| 4616 |
// "host.image.name" semantic conventions. It represents the name of the VM |
| 4617 |
// image or OS install the host was instantiated from. |
| 4618 |
func HostImageName(val string) attribute.KeyValue { |
| 4619 |
return HostImageNameKey.String(val) |
| 4620 |
} |
| 4621 |
|
| 4622 |
// HostImageVersion returns an attribute KeyValue conforming to the |
| 4623 |
// "host.image.version" semantic conventions. It represents the version string |
| 4624 |
// of the VM image or host OS as defined in [Version |
| 4625 |
// Attributes](/docs/resource/README.md#version-attributes). |
| 4626 |
func HostImageVersion(val string) attribute.KeyValue { |
| 4627 |
return HostImageVersionKey.String(val) |
| 4628 |
} |
| 4629 |
|
| 4630 |
// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic |
| 4631 |
// conventions. It represents the available IP addresses of the host, excluding |
| 4632 |
// loopback interfaces. |
| 4633 |
func HostIP(val ...string) attribute.KeyValue { |
| 4634 |
return HostIPKey.StringSlice(val) |
| 4635 |
} |
| 4636 |
|
| 4637 |
// HostMac returns an attribute KeyValue conforming to the "host.mac" |
| 4638 |
// semantic conventions. It represents the available MAC addresses of the host, |
| 4639 |
// excluding loopback interfaces. |
| 4640 |
func HostMac(val ...string) attribute.KeyValue { |
| 4641 |
return HostMacKey.StringSlice(val) |
| 4642 |
} |
| 4643 |
|
| 4644 |
// HostName returns an attribute KeyValue conforming to the "host.name" |
| 4645 |
// semantic conventions. It represents the name of the host. On Unix systems, |
| 4646 |
// it may contain what the hostname command returns, or the fully qualified |
| 4647 |
// hostname, or another name specified by the user. |
| 4648 |
func HostName(val string) attribute.KeyValue { |
| 4649 |
return HostNameKey.String(val) |
| 4650 |
} |
| 4651 |
|
| 4652 |
// HostType returns an attribute KeyValue conforming to the "host.type" |
| 4653 |
// semantic conventions. It represents the type of host. For Cloud, this must |
| 4654 |
// be the machine type. |
| 4655 |
func HostType(val string) attribute.KeyValue { |
| 4656 |
return HostTypeKey.String(val) |
| 4657 |
} |
| 4658 |
|
| 4659 |
// Semantic convention attributes in the HTTP namespace. |
| 4660 |
const ( |
| 4661 |
// HTTPConnectionStateKey is the attribute Key conforming to the |
| 4662 |
// "http.connection.state" semantic conventions. It represents the state of |
| 4663 |
// the HTTP connection in the HTTP connection pool. |
| 4664 |
// |
| 4665 |
// Type: Enum |
| 4666 |
// RequirementLevel: Optional |
| 4667 |
// Stability: experimental |
| 4668 |
// Examples: 'active', 'idle' |
| 4669 |
HTTPConnectionStateKey = attribute.Key("http.connection.state") |
| 4670 |
|
| 4671 |
// HTTPRequestBodySizeKey is the attribute Key conforming to the |
| 4672 |
// "http.request.body.size" semantic conventions. It represents the size of |
| 4673 |
// the request payload body in bytes. This is the number of bytes |
| 4674 |
// transferred excluding headers and is often, but not always, present as |
| 4675 |
// the |
| 4676 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 4677 |
// header. For requests using transport encoding, this should be the |
| 4678 |
// compressed size. |
| 4679 |
// |
| 4680 |
// Type: int |
| 4681 |
// RequirementLevel: Optional |
| 4682 |
// Stability: experimental |
| 4683 |
// Examples: 3495 |
| 4684 |
HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") |
| 4685 |
|
| 4686 |
// HTTPRequestMethodKey is the attribute Key conforming to the |
| 4687 |
// "http.request.method" semantic conventions. It represents the hTTP |
| 4688 |
// request method. |
| 4689 |
// |
| 4690 |
// Type: Enum |
| 4691 |
// RequirementLevel: Optional |
| 4692 |
// Stability: stable |
| 4693 |
// Examples: 'GET', 'POST', 'HEAD' |
| 4694 |
// Note: HTTP request method value SHOULD be "known" to the |
| 4695 |
// instrumentation. |
| 4696 |
// By default, this convention defines "known" methods as the ones listed |
| 4697 |
// in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) |
| 4698 |
// and the PATCH method defined in |
| 4699 |
// [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). |
| 4700 |
// |
| 4701 |
// If the HTTP request method is not known to instrumentation, it MUST set |
| 4702 |
// the `http.request.method` attribute to `_OTHER`. |
| 4703 |
// |
| 4704 |
// If the HTTP instrumentation could end up converting valid HTTP request |
| 4705 |
// methods to `_OTHER`, then it MUST provide a way to override |
| 4706 |
// the list of known HTTP methods. If this override is done via environment |
| 4707 |
// variable, then the environment variable MUST be named |
| 4708 |
// OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated |
| 4709 |
// list of case-sensitive known HTTP methods |
| 4710 |
// (this list MUST be a full override of the default known method, it is |
| 4711 |
// not a list of known methods in addition to the defaults). |
| 4712 |
// |
| 4713 |
// HTTP method names are case-sensitive and `http.request.method` attribute |
| 4714 |
// value MUST match a known HTTP method name exactly. |
| 4715 |
// Instrumentations for specific web frameworks that consider HTTP methods |
| 4716 |
// to be case insensitive, SHOULD populate a canonical equivalent. |
| 4717 |
// Tracing instrumentations that do so, MUST also set |
| 4718 |
// `http.request.method_original` to the original value. |
| 4719 |
HTTPRequestMethodKey = attribute.Key("http.request.method") |
| 4720 |
|
| 4721 |
// HTTPRequestMethodOriginalKey is the attribute Key conforming to the |
| 4722 |
// "http.request.method_original" semantic conventions. It represents the |
| 4723 |
// original HTTP method sent by the client in the request line. |
| 4724 |
// |
| 4725 |
// Type: string |
| 4726 |
// RequirementLevel: Optional |
| 4727 |
// Stability: stable |
| 4728 |
// Examples: 'GeT', 'ACL', 'foo' |
| 4729 |
HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") |
| 4730 |
|
| 4731 |
// HTTPRequestResendCountKey is the attribute Key conforming to the |
| 4732 |
// "http.request.resend_count" semantic conventions. It represents the |
| 4733 |
// ordinal number of request resending attempt (for any reason, including |
| 4734 |
// redirects). |
| 4735 |
// |
| 4736 |
// Type: int |
| 4737 |
// RequirementLevel: Optional |
| 4738 |
// Stability: stable |
| 4739 |
// Examples: 3 |
| 4740 |
// Note: The resend count SHOULD be updated each time an HTTP request gets |
| 4741 |
// resent by the client, regardless of what was the cause of the resending |
| 4742 |
// (e.g. redirection, authorization failure, 503 Server Unavailable, |
| 4743 |
// network issues, or any other). |
| 4744 |
HTTPRequestResendCountKey = attribute.Key("http.request.resend_count") |
| 4745 |
|
| 4746 |
// HTTPRequestSizeKey is the attribute Key conforming to the |
| 4747 |
// "http.request.size" semantic conventions. It represents the total size |
| 4748 |
// of the request in bytes. This should be the total number of bytes sent |
| 4749 |
// over the wire, including the request line (HTTP/1.1), framing (HTTP/2 |
| 4750 |
// and HTTP/3), headers, and request body if any. |
| 4751 |
// |
| 4752 |
// Type: int |
| 4753 |
// RequirementLevel: Optional |
| 4754 |
// Stability: experimental |
| 4755 |
// Examples: 1437 |
| 4756 |
HTTPRequestSizeKey = attribute.Key("http.request.size") |
| 4757 |
|
| 4758 |
// HTTPResponseBodySizeKey is the attribute Key conforming to the |
| 4759 |
// "http.response.body.size" semantic conventions. It represents the size |
| 4760 |
// of the response payload body in bytes. This is the number of bytes |
| 4761 |
// transferred excluding headers and is often, but not always, present as |
| 4762 |
// the |
| 4763 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 4764 |
// header. For requests using transport encoding, this should be the |
| 4765 |
// compressed size. |
| 4766 |
// |
| 4767 |
// Type: int |
| 4768 |
// RequirementLevel: Optional |
| 4769 |
// Stability: experimental |
| 4770 |
// Examples: 3495 |
| 4771 |
HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") |
| 4772 |
|
| 4773 |
// HTTPResponseSizeKey is the attribute Key conforming to the |
| 4774 |
// "http.response.size" semantic conventions. It represents the total size |
| 4775 |
// of the response in bytes. This should be the total number of bytes sent |
| 4776 |
// over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and |
| 4777 |
// HTTP/3), headers, and response body and trailers if any. |
| 4778 |
// |
| 4779 |
// Type: int |
| 4780 |
// RequirementLevel: Optional |
| 4781 |
// Stability: experimental |
| 4782 |
// Examples: 1437 |
| 4783 |
HTTPResponseSizeKey = attribute.Key("http.response.size") |
| 4784 |
|
| 4785 |
// HTTPResponseStatusCodeKey is the attribute Key conforming to the |
| 4786 |
// "http.response.status_code" semantic conventions. It represents the |
| 4787 |
// [HTTP response status |
| 4788 |
// code](https://tools.ietf.org/html/rfc7231#section-6). |
| 4789 |
// |
| 4790 |
// Type: int |
| 4791 |
// RequirementLevel: Optional |
| 4792 |
// Stability: stable |
| 4793 |
// Examples: 200 |
| 4794 |
HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") |
| 4795 |
|
| 4796 |
// HTTPRouteKey is the attribute Key conforming to the "http.route" |
| 4797 |
// semantic conventions. It represents the matched route, that is, the path |
| 4798 |
// template in the format used by the respective server framework. |
| 4799 |
// |
| 4800 |
// Type: string |
| 4801 |
// RequirementLevel: Optional |
| 4802 |
// Stability: stable |
| 4803 |
// Examples: '/users/:userID?', '{controller}/{action}/{id?}' |
| 4804 |
// Note: MUST NOT be populated when this is not supported by the HTTP |
| 4805 |
// server framework as the route attribute should have low-cardinality and |
| 4806 |
// the URI path can NOT substitute it. |
| 4807 |
// SHOULD include the [application |
| 4808 |
// root](/docs/http/http-spans.md#http-server-definitions) if there is one. |
| 4809 |
HTTPRouteKey = attribute.Key("http.route") |
| 4810 |
) |
| 4811 |
|
| 4812 |
var ( |
| 4813 |
// active state |
| 4814 |
HTTPConnectionStateActive = HTTPConnectionStateKey.String("active") |
| 4815 |
// idle state |
| 4816 |
HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle") |
| 4817 |
) |
| 4818 |
|
| 4819 |
var ( |
| 4820 |
// CONNECT method |
| 4821 |
HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") |
| 4822 |
// DELETE method |
| 4823 |
HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") |
| 4824 |
// GET method |
| 4825 |
HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") |
| 4826 |
// HEAD method |
| 4827 |
HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") |
| 4828 |
// OPTIONS method |
| 4829 |
HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") |
| 4830 |
// PATCH method |
| 4831 |
HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") |
| 4832 |
// POST method |
| 4833 |
HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") |
| 4834 |
// PUT method |
| 4835 |
HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") |
| 4836 |
// TRACE method |
| 4837 |
HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") |
| 4838 |
// Any HTTP method that the instrumentation has no prior knowledge of |
| 4839 |
HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") |
| 4840 |
) |
| 4841 |
|
| 4842 |
// HTTPRequestBodySize returns an attribute KeyValue conforming to the |
| 4843 |
// "http.request.body.size" semantic conventions. It represents the size of the |
| 4844 |
// request payload body in bytes. This is the number of bytes transferred |
| 4845 |
// excluding headers and is often, but not always, present as the |
| 4846 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 4847 |
// header. For requests using transport encoding, this should be the compressed |
| 4848 |
// size. |
| 4849 |
func HTTPRequestBodySize(val int) attribute.KeyValue { |
| 4850 |
return HTTPRequestBodySizeKey.Int(val) |
| 4851 |
} |
| 4852 |
|
| 4853 |
// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the |
| 4854 |
// "http.request.method_original" semantic conventions. It represents the |
| 4855 |
// original HTTP method sent by the client in the request line. |
| 4856 |
func HTTPRequestMethodOriginal(val string) attribute.KeyValue { |
| 4857 |
return HTTPRequestMethodOriginalKey.String(val) |
| 4858 |
} |
| 4859 |
|
| 4860 |
// HTTPRequestResendCount returns an attribute KeyValue conforming to the |
| 4861 |
// "http.request.resend_count" semantic conventions. It represents the ordinal |
| 4862 |
// number of request resending attempt (for any reason, including redirects). |
| 4863 |
func HTTPRequestResendCount(val int) attribute.KeyValue { |
| 4864 |
return HTTPRequestResendCountKey.Int(val) |
| 4865 |
} |
| 4866 |
|
| 4867 |
// HTTPRequestSize returns an attribute KeyValue conforming to the |
| 4868 |
// "http.request.size" semantic conventions. It represents the total size of |
| 4869 |
// the request in bytes. This should be the total number of bytes sent over the |
| 4870 |
// wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), |
| 4871 |
// headers, and request body if any. |
| 4872 |
func HTTPRequestSize(val int) attribute.KeyValue { |
| 4873 |
return HTTPRequestSizeKey.Int(val) |
| 4874 |
} |
| 4875 |
|
| 4876 |
// HTTPResponseBodySize returns an attribute KeyValue conforming to the |
| 4877 |
// "http.response.body.size" semantic conventions. It represents the size of |
| 4878 |
// the response payload body in bytes. This is the number of bytes transferred |
| 4879 |
// excluding headers and is often, but not always, present as the |
| 4880 |
// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) |
| 4881 |
// header. For requests using transport encoding, this should be the compressed |
| 4882 |
// size. |
| 4883 |
func HTTPResponseBodySize(val int) attribute.KeyValue { |
| 4884 |
return HTTPResponseBodySizeKey.Int(val) |
| 4885 |
} |
| 4886 |
|
| 4887 |
// HTTPResponseSize returns an attribute KeyValue conforming to the |
| 4888 |
// "http.response.size" semantic conventions. It represents the total size of |
| 4889 |
// the response in bytes. This should be the total number of bytes sent over |
| 4890 |
// the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), |
| 4891 |
// headers, and response body and trailers if any. |
| 4892 |
func HTTPResponseSize(val int) attribute.KeyValue { |
| 4893 |
return HTTPResponseSizeKey.Int(val) |
| 4894 |
} |
| 4895 |
|
| 4896 |
// HTTPResponseStatusCode returns an attribute KeyValue conforming to the |
| 4897 |
// "http.response.status_code" semantic conventions. It represents the [HTTP |
| 4898 |
// response status code](https://tools.ietf.org/html/rfc7231#section-6). |
| 4899 |
func HTTPResponseStatusCode(val int) attribute.KeyValue { |
| 4900 |
return HTTPResponseStatusCodeKey.Int(val) |
| 4901 |
} |
| 4902 |
|
| 4903 |
// HTTPRoute returns an attribute KeyValue conforming to the "http.route" |
| 4904 |
// semantic conventions. It represents the matched route, that is, the path |
| 4905 |
// template in the format used by the respective server framework. |
| 4906 |
func HTTPRoute(val string) attribute.KeyValue { |
| 4907 |
return HTTPRouteKey.String(val) |
| 4908 |
} |
| 4909 |
|
| 4910 |
// Java Virtual machine related attributes. |
| 4911 |
const ( |
| 4912 |
// JVMBufferPoolNameKey is the attribute Key conforming to the |
| 4913 |
// "jvm.buffer.pool.name" semantic conventions. It represents the name of |
| 4914 |
// the buffer pool. |
| 4915 |
// |
| 4916 |
// Type: string |
| 4917 |
// RequirementLevel: Optional |
| 4918 |
// Stability: experimental |
| 4919 |
// Examples: 'mapped', 'direct' |
| 4920 |
// Note: Pool names are generally obtained via |
| 4921 |
// [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). |
| 4922 |
JVMBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name") |
| 4923 |
|
| 4924 |
// JVMGCActionKey is the attribute Key conforming to the "jvm.gc.action" |
| 4925 |
// semantic conventions. It represents the name of the garbage collector |
| 4926 |
// action. |
| 4927 |
// |
| 4928 |
// Type: string |
| 4929 |
// RequirementLevel: Optional |
| 4930 |
// Stability: stable |
| 4931 |
// Examples: 'end of minor GC', 'end of major GC' |
| 4932 |
// Note: Garbage collector action is generally obtained via |
| 4933 |
// [GarbageCollectionNotificationInfo#getGCAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGCAction()). |
| 4934 |
JVMGCActionKey = attribute.Key("jvm.gc.action") |
| 4935 |
|
| 4936 |
// JVMGCNameKey is the attribute Key conforming to the "jvm.gc.name" |
| 4937 |
// semantic conventions. It represents the name of the garbage collector. |
| 4938 |
// |
| 4939 |
// Type: string |
| 4940 |
// RequirementLevel: Optional |
| 4941 |
// Stability: stable |
| 4942 |
// Examples: 'G1 Young Generation', 'G1 Old Generation' |
| 4943 |
// Note: Garbage collector name is generally obtained via |
| 4944 |
// [GarbageCollectionNotificationInfo#getGCName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGCName()). |
| 4945 |
JVMGCNameKey = attribute.Key("jvm.gc.name") |
| 4946 |
|
| 4947 |
// JVMMemoryPoolNameKey is the attribute Key conforming to the |
| 4948 |
// "jvm.memory.pool.name" semantic conventions. It represents the name of |
| 4949 |
// the memory pool. |
| 4950 |
// |
| 4951 |
// Type: string |
| 4952 |
// RequirementLevel: Optional |
| 4953 |
// Stability: stable |
| 4954 |
// Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' |
| 4955 |
// Note: Pool names are generally obtained via |
| 4956 |
// [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). |
| 4957 |
JVMMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name") |
| 4958 |
|
| 4959 |
// JVMMemoryTypeKey is the attribute Key conforming to the |
| 4960 |
// "jvm.memory.type" semantic conventions. It represents the type of |
| 4961 |
// memory. |
| 4962 |
// |
| 4963 |
// Type: Enum |
| 4964 |
// RequirementLevel: Optional |
| 4965 |
// Stability: stable |
| 4966 |
// Examples: 'heap', 'non_heap' |
| 4967 |
JVMMemoryTypeKey = attribute.Key("jvm.memory.type") |
| 4968 |
|
| 4969 |
// JVMThreadDaemonKey is the attribute Key conforming to the |
| 4970 |
// "jvm.thread.daemon" semantic conventions. It represents the whether the |
| 4971 |
// thread is daemon or not. |
| 4972 |
// |
| 4973 |
// Type: boolean |
| 4974 |
// RequirementLevel: Optional |
| 4975 |
// Stability: stable |
| 4976 |
JVMThreadDaemonKey = attribute.Key("jvm.thread.daemon") |
| 4977 |
|
| 4978 |
// JVMThreadStateKey is the attribute Key conforming to the |
| 4979 |
// "jvm.thread.state" semantic conventions. It represents the state of the |
| 4980 |
// thread. |
| 4981 |
// |
| 4982 |
// Type: Enum |
| 4983 |
// RequirementLevel: Optional |
| 4984 |
// Stability: stable |
| 4985 |
// Examples: 'runnable', 'blocked' |
| 4986 |
JVMThreadStateKey = attribute.Key("jvm.thread.state") |
| 4987 |
) |
| 4988 |
|
| 4989 |
var ( |
| 4990 |
// Heap memory |
| 4991 |
JVMMemoryTypeHeap = JVMMemoryTypeKey.String("heap") |
| 4992 |
// Non-heap memory |
| 4993 |
JVMMemoryTypeNonHeap = JVMMemoryTypeKey.String("non_heap") |
| 4994 |
) |
| 4995 |
|
| 4996 |
var ( |
| 4997 |
// A thread that has not yet started is in this state |
| 4998 |
JVMThreadStateNew = JVMThreadStateKey.String("new") |
| 4999 |
// A thread executing in the Java virtual machine is in this state |
| 5000 |
JVMThreadStateRunnable = JVMThreadStateKey.String("runnable") |
| 5001 |
// A thread that is blocked waiting for a monitor lock is in this state |
| 5002 |
JVMThreadStateBlocked = JVMThreadStateKey.String("blocked") |
| 5003 |
// A thread that is waiting indefinitely for another thread to perform a particular action is in this state |
| 5004 |
JVMThreadStateWaiting = JVMThreadStateKey.String("waiting") |
| 5005 |
// A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state |
| 5006 |
JVMThreadStateTimedWaiting = JVMThreadStateKey.String("timed_waiting") |
| 5007 |
// A thread that has exited is in this state |
| 5008 |
JVMThreadStateTerminated = JVMThreadStateKey.String("terminated") |
| 5009 |
) |
| 5010 |
|
| 5011 |
// JVMBufferPoolName returns an attribute KeyValue conforming to the |
| 5012 |
// "jvm.buffer.pool.name" semantic conventions. It represents the name of the |
| 5013 |
// buffer pool. |
| 5014 |
func JVMBufferPoolName(val string) attribute.KeyValue { |
| 5015 |
return JVMBufferPoolNameKey.String(val) |
| 5016 |
} |
| 5017 |
|
| 5018 |
// JVMGCAction returns an attribute KeyValue conforming to the |
| 5019 |
// "jvm.gc.action" semantic conventions. It represents the name of the garbage |
| 5020 |
// collector action. |
| 5021 |
func JVMGCAction(val string) attribute.KeyValue { |
| 5022 |
return JVMGCActionKey.String(val) |
| 5023 |
} |
| 5024 |
|
| 5025 |
// JVMGCName returns an attribute KeyValue conforming to the "jvm.gc.name" |
| 5026 |
// semantic conventions. It represents the name of the garbage collector. |
| 5027 |
func JVMGCName(val string) attribute.KeyValue { |
| 5028 |
return JVMGCNameKey.String(val) |
| 5029 |
} |
| 5030 |
|
| 5031 |
// JVMMemoryPoolName returns an attribute KeyValue conforming to the |
| 5032 |
// "jvm.memory.pool.name" semantic conventions. It represents the name of the |
| 5033 |
// memory pool. |
| 5034 |
func JVMMemoryPoolName(val string) attribute.KeyValue { |
| 5035 |
return JVMMemoryPoolNameKey.String(val) |
| 5036 |
} |
| 5037 |
|
| 5038 |
// JVMThreadDaemon returns an attribute KeyValue conforming to the |
| 5039 |
// "jvm.thread.daemon" semantic conventions. It represents the whether the |
| 5040 |
// thread is daemon or not. |
| 5041 |
func JVMThreadDaemon(val bool) attribute.KeyValue { |
| 5042 |
return JVMThreadDaemonKey.Bool(val) |
| 5043 |
} |
| 5044 |
|
| 5045 |
// Kubernetes resource attributes. |
| 5046 |
const ( |
| 5047 |
// K8SClusterNameKey is the attribute Key conforming to the |
| 5048 |
// "k8s.cluster.name" semantic conventions. It represents the name of the |
| 5049 |
// cluster. |
| 5050 |
// |
| 5051 |
// Type: string |
| 5052 |
// RequirementLevel: Optional |
| 5053 |
// Stability: experimental |
| 5054 |
// Examples: 'opentelemetry-cluster' |
| 5055 |
K8SClusterNameKey = attribute.Key("k8s.cluster.name") |
| 5056 |
|
| 5057 |
// K8SClusterUIDKey is the attribute Key conforming to the |
| 5058 |
// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for |
| 5059 |
// the cluster, set to the UID of the `kube-system` namespace. |
| 5060 |
// |
| 5061 |
// Type: string |
| 5062 |
// RequirementLevel: Optional |
| 5063 |
// Stability: experimental |
| 5064 |
// Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' |
| 5065 |
// Note: K8S doesn't have support for obtaining a cluster ID. If this is |
| 5066 |
// ever |
| 5067 |
// added, we will recommend collecting the `k8s.cluster.uid` through the |
| 5068 |
// official APIs. In the meantime, we are able to use the `uid` of the |
| 5069 |
// `kube-system` namespace as a proxy for cluster ID. Read on for the |
| 5070 |
// rationale. |
| 5071 |
// |
| 5072 |
// Every object created in a K8S cluster is assigned a distinct UID. The |
| 5073 |
// `kube-system` namespace is used by Kubernetes itself and will exist |
| 5074 |
// for the lifetime of the cluster. Using the `uid` of the `kube-system` |
| 5075 |
// namespace is a reasonable proxy for the K8S ClusterID as it will only |
| 5076 |
// change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are |
| 5077 |
// UUIDs as standardized by |
| 5078 |
// [ISO/IEC 9834-8 and ITU-T |
| 5079 |
// X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). |
| 5080 |
// Which states: |
| 5081 |
// |
| 5082 |
// > If generated according to one of the mechanisms defined in Rec. |
| 5083 |
// ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be |
| 5084 |
// different from all other UUIDs generated before 3603 A.D., or is |
| 5085 |
// extremely likely to be different (depending on the mechanism chosen). |
| 5086 |
// |
| 5087 |
// Therefore, UIDs between clusters should be extremely unlikely to |
| 5088 |
// conflict. |
| 5089 |
K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") |
| 5090 |
|
| 5091 |
// K8SContainerNameKey is the attribute Key conforming to the |
| 5092 |
// "k8s.container.name" semantic conventions. It represents the name of the |
| 5093 |
// Container from Pod specification, must be unique within a Pod. Container |
| 5094 |
// runtime usually uses different globally unique name (`container.name`). |
| 5095 |
// |
| 5096 |
// Type: string |
| 5097 |
// RequirementLevel: Optional |
| 5098 |
// Stability: experimental |
| 5099 |
// Examples: 'redis' |
| 5100 |
K8SContainerNameKey = attribute.Key("k8s.container.name") |
| 5101 |
|
| 5102 |
// K8SContainerRestartCountKey is the attribute Key conforming to the |
| 5103 |
// "k8s.container.restart_count" semantic conventions. It represents the |
| 5104 |
// number of times the container was restarted. This attribute can be used |
| 5105 |
// to identify a particular container (running or stopped) within a |
| 5106 |
// container spec. |
| 5107 |
// |
| 5108 |
// Type: int |
| 5109 |
// RequirementLevel: Optional |
| 5110 |
// Stability: experimental |
| 5111 |
K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") |
| 5112 |
|
| 5113 |
// K8SContainerStatusLastTerminatedReasonKey is the attribute Key |
| 5114 |
// conforming to the "k8s.container.status.last_terminated_reason" semantic |
| 5115 |
// conventions. It represents the last terminated reason of the Container. |
| 5116 |
// |
| 5117 |
// Type: string |
| 5118 |
// RequirementLevel: Optional |
| 5119 |
// Stability: experimental |
| 5120 |
// Examples: 'Evicted', 'Error' |
| 5121 |
K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason") |
| 5122 |
|
| 5123 |
// K8SCronJobNameKey is the attribute Key conforming to the |
| 5124 |
// "k8s.cronjob.name" semantic conventions. It represents the name of the |
| 5125 |
// CronJob. |
| 5126 |
// |
| 5127 |
// Type: string |
| 5128 |
// RequirementLevel: Optional |
| 5129 |
// Stability: experimental |
| 5130 |
// Examples: 'opentelemetry' |
| 5131 |
K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") |
| 5132 |
|
| 5133 |
// K8SCronJobUIDKey is the attribute Key conforming to the |
| 5134 |
// "k8s.cronjob.uid" semantic conventions. It represents the UID of the |
| 5135 |
// CronJob. |
| 5136 |
// |
| 5137 |
// Type: string |
| 5138 |
// RequirementLevel: Optional |
| 5139 |
// Stability: experimental |
| 5140 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5141 |
K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") |
| 5142 |
|
| 5143 |
// K8SDaemonSetNameKey is the attribute Key conforming to the |
| 5144 |
// "k8s.daemonset.name" semantic conventions. It represents the name of the |
| 5145 |
// DaemonSet. |
| 5146 |
// |
| 5147 |
// Type: string |
| 5148 |
// RequirementLevel: Optional |
| 5149 |
// Stability: experimental |
| 5150 |
// Examples: 'opentelemetry' |
| 5151 |
K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") |
| 5152 |
|
| 5153 |
// K8SDaemonSetUIDKey is the attribute Key conforming to the |
| 5154 |
// "k8s.daemonset.uid" semantic conventions. It represents the UID of the |
| 5155 |
// DaemonSet. |
| 5156 |
// |
| 5157 |
// Type: string |
| 5158 |
// RequirementLevel: Optional |
| 5159 |
// Stability: experimental |
| 5160 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5161 |
K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") |
| 5162 |
|
| 5163 |
// K8SDeploymentNameKey is the attribute Key conforming to the |
| 5164 |
// "k8s.deployment.name" semantic conventions. It represents the name of |
| 5165 |
// the Deployment. |
| 5166 |
// |
| 5167 |
// Type: string |
| 5168 |
// RequirementLevel: Optional |
| 5169 |
// Stability: experimental |
| 5170 |
// Examples: 'opentelemetry' |
| 5171 |
K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") |
| 5172 |
|
| 5173 |
// K8SDeploymentUIDKey is the attribute Key conforming to the |
| 5174 |
// "k8s.deployment.uid" semantic conventions. It represents the UID of the |
| 5175 |
// Deployment. |
| 5176 |
// |
| 5177 |
// Type: string |
| 5178 |
// RequirementLevel: Optional |
| 5179 |
// Stability: experimental |
| 5180 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5181 |
K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") |
| 5182 |
|
| 5183 |
// K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" |
| 5184 |
// semantic conventions. It represents the name of the Job. |
| 5185 |
// |
| 5186 |
// Type: string |
| 5187 |
// RequirementLevel: Optional |
| 5188 |
// Stability: experimental |
| 5189 |
// Examples: 'opentelemetry' |
| 5190 |
K8SJobNameKey = attribute.Key("k8s.job.name") |
| 5191 |
|
| 5192 |
// K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" |
| 5193 |
// semantic conventions. It represents the UID of the Job. |
| 5194 |
// |
| 5195 |
// Type: string |
| 5196 |
// RequirementLevel: Optional |
| 5197 |
// Stability: experimental |
| 5198 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5199 |
K8SJobUIDKey = attribute.Key("k8s.job.uid") |
| 5200 |
|
| 5201 |
// K8SNamespaceNameKey is the attribute Key conforming to the |
| 5202 |
// "k8s.namespace.name" semantic conventions. It represents the name of the |
| 5203 |
// namespace that the pod is running in. |
| 5204 |
// |
| 5205 |
// Type: string |
| 5206 |
// RequirementLevel: Optional |
| 5207 |
// Stability: experimental |
| 5208 |
// Examples: 'default' |
| 5209 |
K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") |
| 5210 |
|
| 5211 |
// K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" |
| 5212 |
// semantic conventions. It represents the name of the Node. |
| 5213 |
// |
| 5214 |
// Type: string |
| 5215 |
// RequirementLevel: Optional |
| 5216 |
// Stability: experimental |
| 5217 |
// Examples: 'node-1' |
| 5218 |
K8SNodeNameKey = attribute.Key("k8s.node.name") |
| 5219 |
|
| 5220 |
// K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" |
| 5221 |
// semantic conventions. It represents the UID of the Node. |
| 5222 |
// |
| 5223 |
// Type: string |
| 5224 |
// RequirementLevel: Optional |
| 5225 |
// Stability: experimental |
| 5226 |
// Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' |
| 5227 |
K8SNodeUIDKey = attribute.Key("k8s.node.uid") |
| 5228 |
|
| 5229 |
// K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" |
| 5230 |
// semantic conventions. It represents the name of the Pod. |
| 5231 |
// |
| 5232 |
// Type: string |
| 5233 |
// RequirementLevel: Optional |
| 5234 |
// Stability: experimental |
| 5235 |
// Examples: 'opentelemetry-pod-autoconf' |
| 5236 |
K8SPodNameKey = attribute.Key("k8s.pod.name") |
| 5237 |
|
| 5238 |
// K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" |
| 5239 |
// semantic conventions. It represents the UID of the Pod. |
| 5240 |
// |
| 5241 |
// Type: string |
| 5242 |
// RequirementLevel: Optional |
| 5243 |
// Stability: experimental |
| 5244 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5245 |
K8SPodUIDKey = attribute.Key("k8s.pod.uid") |
| 5246 |
|
| 5247 |
// K8SReplicaSetNameKey is the attribute Key conforming to the |
| 5248 |
// "k8s.replicaset.name" semantic conventions. It represents the name of |
| 5249 |
// the ReplicaSet. |
| 5250 |
// |
| 5251 |
// Type: string |
| 5252 |
// RequirementLevel: Optional |
| 5253 |
// Stability: experimental |
| 5254 |
// Examples: 'opentelemetry' |
| 5255 |
K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") |
| 5256 |
|
| 5257 |
// K8SReplicaSetUIDKey is the attribute Key conforming to the |
| 5258 |
// "k8s.replicaset.uid" semantic conventions. It represents the UID of the |
| 5259 |
// ReplicaSet. |
| 5260 |
// |
| 5261 |
// Type: string |
| 5262 |
// RequirementLevel: Optional |
| 5263 |
// Stability: experimental |
| 5264 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5265 |
K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") |
| 5266 |
|
| 5267 |
// K8SStatefulSetNameKey is the attribute Key conforming to the |
| 5268 |
// "k8s.statefulset.name" semantic conventions. It represents the name of |
| 5269 |
// the StatefulSet. |
| 5270 |
// |
| 5271 |
// Type: string |
| 5272 |
// RequirementLevel: Optional |
| 5273 |
// Stability: experimental |
| 5274 |
// Examples: 'opentelemetry' |
| 5275 |
K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") |
| 5276 |
|
| 5277 |
// K8SStatefulSetUIDKey is the attribute Key conforming to the |
| 5278 |
// "k8s.statefulset.uid" semantic conventions. It represents the UID of the |
| 5279 |
// StatefulSet. |
| 5280 |
// |
| 5281 |
// Type: string |
| 5282 |
// RequirementLevel: Optional |
| 5283 |
// Stability: experimental |
| 5284 |
// Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' |
| 5285 |
K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") |
| 5286 |
) |
| 5287 |
|
| 5288 |
// K8SClusterName returns an attribute KeyValue conforming to the |
| 5289 |
// "k8s.cluster.name" semantic conventions. It represents the name of the |
| 5290 |
// cluster. |
| 5291 |
func K8SClusterName(val string) attribute.KeyValue { |
| 5292 |
return K8SClusterNameKey.String(val) |
| 5293 |
} |
| 5294 |
|
| 5295 |
// K8SClusterUID returns an attribute KeyValue conforming to the |
| 5296 |
// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the |
| 5297 |
// cluster, set to the UID of the `kube-system` namespace. |
| 5298 |
func K8SClusterUID(val string) attribute.KeyValue { |
| 5299 |
return K8SClusterUIDKey.String(val) |
| 5300 |
} |
| 5301 |
|
| 5302 |
// K8SContainerName returns an attribute KeyValue conforming to the |
| 5303 |
// "k8s.container.name" semantic conventions. It represents the name of the |
| 5304 |
// Container from Pod specification, must be unique within a Pod. Container |
| 5305 |
// runtime usually uses different globally unique name (`container.name`). |
| 5306 |
func K8SContainerName(val string) attribute.KeyValue { |
| 5307 |
return K8SContainerNameKey.String(val) |
| 5308 |
} |
| 5309 |
|
| 5310 |
// K8SContainerRestartCount returns an attribute KeyValue conforming to the |
| 5311 |
// "k8s.container.restart_count" semantic conventions. It represents the number |
| 5312 |
// of times the container was restarted. This attribute can be used to identify |
| 5313 |
// a particular container (running or stopped) within a container spec. |
| 5314 |
func K8SContainerRestartCount(val int) attribute.KeyValue { |
| 5315 |
return K8SContainerRestartCountKey.Int(val) |
| 5316 |
} |
| 5317 |
|
| 5318 |
// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue |
| 5319 |
// conforming to the "k8s.container.status.last_terminated_reason" semantic |
| 5320 |
// conventions. It represents the last terminated reason of the Container. |
| 5321 |
func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue { |
| 5322 |
return K8SContainerStatusLastTerminatedReasonKey.String(val) |
| 5323 |
} |
| 5324 |
|
| 5325 |
// K8SCronJobName returns an attribute KeyValue conforming to the |
| 5326 |
// "k8s.cronjob.name" semantic conventions. It represents the name of the |
| 5327 |
// CronJob. |
| 5328 |
func K8SCronJobName(val string) attribute.KeyValue { |
| 5329 |
return K8SCronJobNameKey.String(val) |
| 5330 |
} |
| 5331 |
|
| 5332 |
// K8SCronJobUID returns an attribute KeyValue conforming to the |
| 5333 |
// "k8s.cronjob.uid" semantic conventions. It represents the UID of the |
| 5334 |
// CronJob. |
| 5335 |
func K8SCronJobUID(val string) attribute.KeyValue { |
| 5336 |
return K8SCronJobUIDKey.String(val) |
| 5337 |
} |
| 5338 |
|
| 5339 |
// K8SDaemonSetName returns an attribute KeyValue conforming to the |
| 5340 |
// "k8s.daemonset.name" semantic conventions. It represents the name of the |
| 5341 |
// DaemonSet. |
| 5342 |
func K8SDaemonSetName(val string) attribute.KeyValue { |
| 5343 |
return K8SDaemonSetNameKey.String(val) |
| 5344 |
} |
| 5345 |
|
| 5346 |
// K8SDaemonSetUID returns an attribute KeyValue conforming to the |
| 5347 |
// "k8s.daemonset.uid" semantic conventions. It represents the UID of the |
| 5348 |
// DaemonSet. |
| 5349 |
func K8SDaemonSetUID(val string) attribute.KeyValue { |
| 5350 |
return K8SDaemonSetUIDKey.String(val) |
| 5351 |
} |
| 5352 |
|
| 5353 |
// K8SDeploymentName returns an attribute KeyValue conforming to the |
| 5354 |
// "k8s.deployment.name" semantic conventions. It represents the name of the |
| 5355 |
// Deployment. |
| 5356 |
func K8SDeploymentName(val string) attribute.KeyValue { |
| 5357 |
return K8SDeploymentNameKey.String(val) |
| 5358 |
} |
| 5359 |
|
| 5360 |
// K8SDeploymentUID returns an attribute KeyValue conforming to the |
| 5361 |
// "k8s.deployment.uid" semantic conventions. It represents the UID of the |
| 5362 |
// Deployment. |
| 5363 |
func K8SDeploymentUID(val string) attribute.KeyValue { |
| 5364 |
return K8SDeploymentUIDKey.String(val) |
| 5365 |
} |
| 5366 |
|
| 5367 |
// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" |
| 5368 |
// semantic conventions. It represents the name of the Job. |
| 5369 |
func K8SJobName(val string) attribute.KeyValue { |
| 5370 |
return K8SJobNameKey.String(val) |
| 5371 |
} |
| 5372 |
|
| 5373 |
// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" |
| 5374 |
// semantic conventions. It represents the UID of the Job. |
| 5375 |
func K8SJobUID(val string) attribute.KeyValue { |
| 5376 |
return K8SJobUIDKey.String(val) |
| 5377 |
} |
| 5378 |
|
| 5379 |
// K8SNamespaceName returns an attribute KeyValue conforming to the |
| 5380 |
// "k8s.namespace.name" semantic conventions. It represents the name of the |
| 5381 |
// namespace that the pod is running in. |
| 5382 |
func K8SNamespaceName(val string) attribute.KeyValue { |
| 5383 |
return K8SNamespaceNameKey.String(val) |
| 5384 |
} |
| 5385 |
|
| 5386 |
// K8SNodeName returns an attribute KeyValue conforming to the |
| 5387 |
// "k8s.node.name" semantic conventions. It represents the name of the Node. |
| 5388 |
func K8SNodeName(val string) attribute.KeyValue { |
| 5389 |
return K8SNodeNameKey.String(val) |
| 5390 |
} |
| 5391 |
|
| 5392 |
// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" |
| 5393 |
// semantic conventions. It represents the UID of the Node. |
| 5394 |
func K8SNodeUID(val string) attribute.KeyValue { |
| 5395 |
return K8SNodeUIDKey.String(val) |
| 5396 |
} |
| 5397 |
|
| 5398 |
// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" |
| 5399 |
// semantic conventions. It represents the name of the Pod. |
| 5400 |
func K8SPodName(val string) attribute.KeyValue { |
| 5401 |
return K8SPodNameKey.String(val) |
| 5402 |
} |
| 5403 |
|
| 5404 |
// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" |
| 5405 |
// semantic conventions. It represents the UID of the Pod. |
| 5406 |
func K8SPodUID(val string) attribute.KeyValue { |
| 5407 |
return K8SPodUIDKey.String(val) |
| 5408 |
} |
| 5409 |
|
| 5410 |
// K8SReplicaSetName returns an attribute KeyValue conforming to the |
| 5411 |
// "k8s.replicaset.name" semantic conventions. It represents the name of the |
| 5412 |
// ReplicaSet. |
| 5413 |
func K8SReplicaSetName(val string) attribute.KeyValue { |
| 5414 |
return K8SReplicaSetNameKey.String(val) |
| 5415 |
} |
| 5416 |
|
| 5417 |
// K8SReplicaSetUID returns an attribute KeyValue conforming to the |
| 5418 |
// "k8s.replicaset.uid" semantic conventions. It represents the UID of the |
| 5419 |
// ReplicaSet. |
| 5420 |
func K8SReplicaSetUID(val string) attribute.KeyValue { |
| 5421 |
return K8SReplicaSetUIDKey.String(val) |
| 5422 |
} |
| 5423 |
|
| 5424 |
// K8SStatefulSetName returns an attribute KeyValue conforming to the |
| 5425 |
// "k8s.statefulset.name" semantic conventions. It represents the name of the |
| 5426 |
// StatefulSet. |
| 5427 |
func K8SStatefulSetName(val string) attribute.KeyValue { |
| 5428 |
return K8SStatefulSetNameKey.String(val) |
| 5429 |
} |
| 5430 |
|
| 5431 |
// K8SStatefulSetUID returns an attribute KeyValue conforming to the |
| 5432 |
// "k8s.statefulset.uid" semantic conventions. It represents the UID of the |
| 5433 |
// StatefulSet. |
| 5434 |
func K8SStatefulSetUID(val string) attribute.KeyValue { |
| 5435 |
return K8SStatefulSetUIDKey.String(val) |
| 5436 |
} |
| 5437 |
|
| 5438 |
// Describes Linux Memory attributes |
| 5439 |
const ( |
| 5440 |
// LinuxMemorySlabStateKey is the attribute Key conforming to the |
| 5441 |
// "linux.memory.slab.state" semantic conventions. It represents the Linux |
| 5442 |
// Slab memory state |
| 5443 |
// |
| 5444 |
// Type: Enum |
| 5445 |
// RequirementLevel: Optional |
| 5446 |
// Stability: experimental |
| 5447 |
// Examples: 'reclaimable', 'unreclaimable' |
| 5448 |
LinuxMemorySlabStateKey = attribute.Key("linux.memory.slab.state") |
| 5449 |
) |
| 5450 |
|
| 5451 |
var ( |
| 5452 |
// reclaimable |
| 5453 |
LinuxMemorySlabStateReclaimable = LinuxMemorySlabStateKey.String("reclaimable") |
| 5454 |
// unreclaimable |
| 5455 |
LinuxMemorySlabStateUnreclaimable = LinuxMemorySlabStateKey.String("unreclaimable") |
| 5456 |
) |
| 5457 |
|
| 5458 |
// Log attributes |
| 5459 |
const ( |
| 5460 |
// LogIostreamKey is the attribute Key conforming to the "log.iostream" |
| 5461 |
// semantic conventions. It represents the stream associated with the log. |
| 5462 |
// See below for a list of well-known values. |
| 5463 |
// |
| 5464 |
// Type: Enum |
| 5465 |
// RequirementLevel: Optional |
| 5466 |
// Stability: experimental |
| 5467 |
LogIostreamKey = attribute.Key("log.iostream") |
| 5468 |
) |
| 5469 |
|
| 5470 |
var ( |
| 5471 |
// Logs from stdout stream |
| 5472 |
LogIostreamStdout = LogIostreamKey.String("stdout") |
| 5473 |
// Events from stderr stream |
| 5474 |
LogIostreamStderr = LogIostreamKey.String("stderr") |
| 5475 |
) |
| 5476 |
|
| 5477 |
// Attributes for a file to which log was emitted. |
| 5478 |
const ( |
| 5479 |
// LogFileNameKey is the attribute Key conforming to the "log.file.name" |
| 5480 |
// semantic conventions. It represents the basename of the file. |
| 5481 |
// |
| 5482 |
// Type: string |
| 5483 |
// RequirementLevel: Optional |
| 5484 |
// Stability: experimental |
| 5485 |
// Examples: 'audit.log' |
| 5486 |
LogFileNameKey = attribute.Key("log.file.name") |
| 5487 |
|
| 5488 |
// LogFileNameResolvedKey is the attribute Key conforming to the |
| 5489 |
// "log.file.name_resolved" semantic conventions. It represents the |
| 5490 |
// basename of the file, with symlinks resolved. |
| 5491 |
// |
| 5492 |
// Type: string |
| 5493 |
// RequirementLevel: Optional |
| 5494 |
// Stability: experimental |
| 5495 |
// Examples: 'uuid.log' |
| 5496 |
LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") |
| 5497 |
|
| 5498 |
// LogFilePathKey is the attribute Key conforming to the "log.file.path" |
| 5499 |
// semantic conventions. It represents the full path to the file. |
| 5500 |
// |
| 5501 |
// Type: string |
| 5502 |
// RequirementLevel: Optional |
| 5503 |
// Stability: experimental |
| 5504 |
// Examples: '/var/log/mysql/audit.log' |
| 5505 |
LogFilePathKey = attribute.Key("log.file.path") |
| 5506 |
|
| 5507 |
// LogFilePathResolvedKey is the attribute Key conforming to the |
| 5508 |
// "log.file.path_resolved" semantic conventions. It represents the full |
| 5509 |
// path to the file, with symlinks resolved. |
| 5510 |
// |
| 5511 |
// Type: string |
| 5512 |
// RequirementLevel: Optional |
| 5513 |
// Stability: experimental |
| 5514 |
// Examples: '/var/lib/docker/uuid.log' |
| 5515 |
LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") |
| 5516 |
) |
| 5517 |
|
| 5518 |
// LogFileName returns an attribute KeyValue conforming to the |
| 5519 |
// "log.file.name" semantic conventions. It represents the basename of the |
| 5520 |
// file. |
| 5521 |
func LogFileName(val string) attribute.KeyValue { |
| 5522 |
return LogFileNameKey.String(val) |
| 5523 |
} |
| 5524 |
|
| 5525 |
// LogFileNameResolved returns an attribute KeyValue conforming to the |
| 5526 |
// "log.file.name_resolved" semantic conventions. It represents the basename of |
| 5527 |
// the file, with symlinks resolved. |
| 5528 |
func LogFileNameResolved(val string) attribute.KeyValue { |
| 5529 |
return LogFileNameResolvedKey.String(val) |
| 5530 |
} |
| 5531 |
|
| 5532 |
// LogFilePath returns an attribute KeyValue conforming to the |
| 5533 |
// "log.file.path" semantic conventions. It represents the full path to the |
| 5534 |
// file. |
| 5535 |
func LogFilePath(val string) attribute.KeyValue { |
| 5536 |
return LogFilePathKey.String(val) |
| 5537 |
} |
| 5538 |
|
| 5539 |
// LogFilePathResolved returns an attribute KeyValue conforming to the |
| 5540 |
// "log.file.path_resolved" semantic conventions. It represents the full path |
| 5541 |
// to the file, with symlinks resolved. |
| 5542 |
func LogFilePathResolved(val string) attribute.KeyValue { |
| 5543 |
return LogFilePathResolvedKey.String(val) |
| 5544 |
} |
| 5545 |
|
| 5546 |
// The generic attributes that may be used in any Log Record. |
| 5547 |
const ( |
| 5548 |
// LogRecordOriginalKey is the attribute Key conforming to the |
| 5549 |
// "log.record.original" semantic conventions. It represents the complete |
| 5550 |
// orignal Log Record. |
| 5551 |
// |
| 5552 |
// Type: string |
| 5553 |
// RequirementLevel: Optional |
| 5554 |
// Stability: experimental |
| 5555 |
// Examples: '77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - |
| 5556 |
// - Something happened', '[INFO] 8/3/24 12:34:56 Something happened' |
| 5557 |
// Note: This value MAY be added when processing a Log Record which was |
| 5558 |
// originally transmitted as a string or equivalent data type AND the Body |
| 5559 |
// field of the Log Record does not contain the same value. (e.g. a syslog |
| 5560 |
// or a log record read from a file.) |
| 5561 |
LogRecordOriginalKey = attribute.Key("log.record.original") |
| 5562 |
|
| 5563 |
// LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" |
| 5564 |
// semantic conventions. It represents a unique identifier for the Log |
| 5565 |
// Record. |
| 5566 |
// |
| 5567 |
// Type: string |
| 5568 |
// RequirementLevel: Optional |
| 5569 |
// Stability: experimental |
| 5570 |
// Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' |
| 5571 |
// Note: If an id is provided, other log records with the same id will be |
| 5572 |
// considered duplicates and can be removed safely. This means, that two |
| 5573 |
// distinguishable log records MUST have different values. |
| 5574 |
// The id MAY be an [Universally Unique Lexicographically Sortable |
| 5575 |
// Identifier (ULID)](https://github.com/ulid/spec), but other identifiers |
| 5576 |
// (e.g. UUID) may be used as needed. |
| 5577 |
LogRecordUIDKey = attribute.Key("log.record.uid") |
| 5578 |
) |
| 5579 |
|
| 5580 |
// LogRecordOriginal returns an attribute KeyValue conforming to the |
| 5581 |
// "log.record.original" semantic conventions. It represents the complete |
| 5582 |
// orignal Log Record. |
| 5583 |
func LogRecordOriginal(val string) attribute.KeyValue { |
| 5584 |
return LogRecordOriginalKey.String(val) |
| 5585 |
} |
| 5586 |
|
| 5587 |
// LogRecordUID returns an attribute KeyValue conforming to the |
| 5588 |
// "log.record.uid" semantic conventions. It represents a unique identifier for |
| 5589 |
// the Log Record. |
| 5590 |
func LogRecordUID(val string) attribute.KeyValue { |
| 5591 |
return LogRecordUIDKey.String(val) |
| 5592 |
} |
| 5593 |
|
| 5594 |
// Attributes describing telemetry around messaging systems and messaging |
| 5595 |
// activities. |
| 5596 |
const ( |
| 5597 |
// MessagingBatchMessageCountKey is the attribute Key conforming to the |
| 5598 |
// "messaging.batch.message_count" semantic conventions. It represents the |
| 5599 |
// number of messages sent, received, or processed in the scope of the |
| 5600 |
// batching operation. |
| 5601 |
// |
| 5602 |
// Type: int |
| 5603 |
// RequirementLevel: Optional |
| 5604 |
// Stability: experimental |
| 5605 |
// Examples: 0, 1, 2 |
| 5606 |
// Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on |
| 5607 |
// spans that operate with a single message. When a messaging client |
| 5608 |
// library supports both batch and single-message API for the same |
| 5609 |
// operation, instrumentations SHOULD use `messaging.batch.message_count` |
| 5610 |
// for batching APIs and SHOULD NOT use it for single-message APIs. |
| 5611 |
MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") |
| 5612 |
|
| 5613 |
// MessagingClientIDKey is the attribute Key conforming to the |
| 5614 |
// "messaging.client.id" semantic conventions. It represents a unique |
| 5615 |
// identifier for the client that consumes or produces a message. |
| 5616 |
// |
| 5617 |
// Type: string |
| 5618 |
// RequirementLevel: Optional |
| 5619 |
// Stability: experimental |
| 5620 |
// Examples: 'client-5', 'myhost@8742@s8083jm' |
| 5621 |
MessagingClientIDKey = attribute.Key("messaging.client.id") |
| 5622 |
|
| 5623 |
// MessagingConsumerGroupNameKey is the attribute Key conforming to the |
| 5624 |
// "messaging.consumer.group.name" semantic conventions. It represents the |
| 5625 |
// name of the consumer group with which a consumer is associated. |
| 5626 |
// |
| 5627 |
// Type: string |
| 5628 |
// RequirementLevel: Optional |
| 5629 |
// Stability: experimental |
| 5630 |
// Examples: 'my-group', 'indexer' |
| 5631 |
// Note: Semantic conventions for individual messaging systems SHOULD |
| 5632 |
// document whether `messaging.consumer.group.name` is applicable and what |
| 5633 |
// it means in the context of that system. |
| 5634 |
MessagingConsumerGroupNameKey = attribute.Key("messaging.consumer.group.name") |
| 5635 |
|
| 5636 |
// MessagingDestinationAnonymousKey is the attribute Key conforming to the |
| 5637 |
// "messaging.destination.anonymous" semantic conventions. It represents a |
| 5638 |
// boolean that is true if the message destination is anonymous (could be |
| 5639 |
// unnamed or have auto-generated name). |
| 5640 |
// |
| 5641 |
// Type: boolean |
| 5642 |
// RequirementLevel: Optional |
| 5643 |
// Stability: experimental |
| 5644 |
MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") |
| 5645 |
|
| 5646 |
// MessagingDestinationNameKey is the attribute Key conforming to the |
| 5647 |
// "messaging.destination.name" semantic conventions. It represents the |
| 5648 |
// message destination name |
| 5649 |
// |
| 5650 |
// Type: string |
| 5651 |
// RequirementLevel: Optional |
| 5652 |
// Stability: experimental |
| 5653 |
// Examples: 'MyQueue', 'MyTopic' |
| 5654 |
// Note: Destination name SHOULD uniquely identify a specific queue, topic |
| 5655 |
// or other entity within the broker. If |
| 5656 |
// the broker doesn't have such notion, the destination name SHOULD |
| 5657 |
// uniquely identify the broker. |
| 5658 |
MessagingDestinationNameKey = attribute.Key("messaging.destination.name") |
| 5659 |
|
| 5660 |
// MessagingDestinationPartitionIDKey is the attribute Key conforming to |
| 5661 |
// the "messaging.destination.partition.id" semantic conventions. It |
| 5662 |
// represents the identifier of the partition messages are sent to or |
| 5663 |
// received from, unique within the `messaging.destination.name`. |
| 5664 |
// |
| 5665 |
// Type: string |
| 5666 |
// RequirementLevel: Optional |
| 5667 |
// Stability: experimental |
| 5668 |
// Examples: '1' |
| 5669 |
MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id") |
| 5670 |
|
| 5671 |
// MessagingDestinationSubscriptionNameKey is the attribute Key conforming |
| 5672 |
// to the "messaging.destination.subscription.name" semantic conventions. |
| 5673 |
// It represents the name of the destination subscription from which a |
| 5674 |
// message is consumed. |
| 5675 |
// |
| 5676 |
// Type: string |
| 5677 |
// RequirementLevel: Optional |
| 5678 |
// Stability: experimental |
| 5679 |
// Examples: 'subscription-a' |
| 5680 |
// Note: Semantic conventions for individual messaging systems SHOULD |
| 5681 |
// document whether `messaging.destination.subscription.name` is applicable |
| 5682 |
// and what it means in the context of that system. |
| 5683 |
MessagingDestinationSubscriptionNameKey = attribute.Key("messaging.destination.subscription.name") |
| 5684 |
|
| 5685 |
// MessagingDestinationTemplateKey is the attribute Key conforming to the |
| 5686 |
// "messaging.destination.template" semantic conventions. It represents the |
| 5687 |
// low cardinality representation of the messaging destination name |
| 5688 |
// |
| 5689 |
// Type: string |
| 5690 |
// RequirementLevel: Optional |
| 5691 |
// Stability: experimental |
| 5692 |
// Examples: '/customers/{customerID}' |
| 5693 |
// Note: Destination names could be constructed from templates. An example |
| 5694 |
// would be a destination name involving a user name or product id. |
| 5695 |
// Although the destination name in this case is of high cardinality, the |
| 5696 |
// underlying template is of low cardinality and can be effectively used |
| 5697 |
// for grouping and aggregation. |
| 5698 |
MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") |
| 5699 |
|
| 5700 |
// MessagingDestinationTemporaryKey is the attribute Key conforming to the |
| 5701 |
// "messaging.destination.temporary" semantic conventions. It represents a |
| 5702 |
// boolean that is true if the message destination is temporary and might |
| 5703 |
// not exist anymore after messages are processed. |
| 5704 |
// |
| 5705 |
// Type: boolean |
| 5706 |
// RequirementLevel: Optional |
| 5707 |
// Stability: experimental |
| 5708 |
MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") |
| 5709 |
|
| 5710 |
// MessagingMessageBodySizeKey is the attribute Key conforming to the |
| 5711 |
// "messaging.message.body.size" semantic conventions. It represents the |
| 5712 |
// size of the message body in bytes. |
| 5713 |
// |
| 5714 |
// Type: int |
| 5715 |
// RequirementLevel: Optional |
| 5716 |
// Stability: experimental |
| 5717 |
// Examples: 1439 |
| 5718 |
// Note: This can refer to both the compressed or uncompressed body size. |
| 5719 |
// If both sizes are known, the uncompressed |
| 5720 |
// body size should be used. |
| 5721 |
MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size") |
| 5722 |
|
| 5723 |
// MessagingMessageConversationIDKey is the attribute Key conforming to the |
| 5724 |
// "messaging.message.conversation_id" semantic conventions. It represents |
| 5725 |
// the conversation ID identifying the conversation to which the message |
| 5726 |
// belongs, represented as a string. Sometimes called "Correlation ID". |
| 5727 |
// |
| 5728 |
// Type: string |
| 5729 |
// RequirementLevel: Optional |
| 5730 |
// Stability: experimental |
| 5731 |
// Examples: 'MyConversationID' |
| 5732 |
MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") |
| 5733 |
|
| 5734 |
// MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the |
| 5735 |
// "messaging.message.envelope.size" semantic conventions. It represents |
| 5736 |
// the size of the message body and metadata in bytes. |
| 5737 |
// |
| 5738 |
// Type: int |
| 5739 |
// RequirementLevel: Optional |
| 5740 |
// Stability: experimental |
| 5741 |
// Examples: 2738 |
| 5742 |
// Note: This can refer to both the compressed or uncompressed size. If |
| 5743 |
// both sizes are known, the uncompressed |
| 5744 |
// size should be used. |
| 5745 |
MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size") |
| 5746 |
|
| 5747 |
// MessagingMessageIDKey is the attribute Key conforming to the |
| 5748 |
// "messaging.message.id" semantic conventions. It represents a value used |
| 5749 |
// by the messaging system as an identifier for the message, represented as |
| 5750 |
// a string. |
| 5751 |
// |
| 5752 |
// Type: string |
| 5753 |
// RequirementLevel: Optional |
| 5754 |
// Stability: experimental |
| 5755 |
// Examples: '452a7c7c7c7048c2f887f61572b18fc2' |
| 5756 |
MessagingMessageIDKey = attribute.Key("messaging.message.id") |
| 5757 |
|
| 5758 |
// MessagingOperationNameKey is the attribute Key conforming to the |
| 5759 |
// "messaging.operation.name" semantic conventions. It represents the |
| 5760 |
// system-specific name of the messaging operation. |
| 5761 |
// |
| 5762 |
// Type: string |
| 5763 |
// RequirementLevel: Optional |
| 5764 |
// Stability: experimental |
| 5765 |
// Examples: 'ack', 'nack', 'send' |
| 5766 |
MessagingOperationNameKey = attribute.Key("messaging.operation.name") |
| 5767 |
|
| 5768 |
// MessagingOperationTypeKey is the attribute Key conforming to the |
| 5769 |
// "messaging.operation.type" semantic conventions. It represents a string |
| 5770 |
// identifying the type of the messaging operation. |
| 5771 |
// |
| 5772 |
// Type: Enum |
| 5773 |
// RequirementLevel: Optional |
| 5774 |
// Stability: experimental |
| 5775 |
// Note: If a custom value is used, it MUST be of low cardinality. |
| 5776 |
MessagingOperationTypeKey = attribute.Key("messaging.operation.type") |
| 5777 |
|
| 5778 |
// MessagingSystemKey is the attribute Key conforming to the |
| 5779 |
// "messaging.system" semantic conventions. It represents the messaging |
| 5780 |
// system as identified by the client instrumentation. |
| 5781 |
// |
| 5782 |
// Type: Enum |
| 5783 |
// RequirementLevel: Optional |
| 5784 |
// Stability: experimental |
| 5785 |
// Note: The actual messaging system may differ from the one known by the |
| 5786 |
// client. For example, when using Kafka client libraries to communicate |
| 5787 |
// with Azure Event Hubs, the `messaging.system` is set to `kafka` based on |
| 5788 |
// the instrumentation's best knowledge. |
| 5789 |
MessagingSystemKey = attribute.Key("messaging.system") |
| 5790 |
) |
| 5791 |
|
| 5792 |
var ( |
| 5793 |
// One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created |
| 5794 |
MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish") |
| 5795 |
// A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios |
| 5796 |
MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create") |
| 5797 |
// One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages |
| 5798 |
MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive") |
| 5799 |
// One or more messages are processed by a consumer |
| 5800 |
MessagingOperationTypeProcess = MessagingOperationTypeKey.String("process") |
| 5801 |
// One or more messages are settled |
| 5802 |
MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle") |
| 5803 |
// Deprecated. Use `process` instead |
| 5804 |
MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("deliver") |
| 5805 |
) |
| 5806 |
|
| 5807 |
var ( |
| 5808 |
// Apache ActiveMQ |
| 5809 |
MessagingSystemActivemq = MessagingSystemKey.String("activemq") |
| 5810 |
// Amazon Simple Queue Service (SQS) |
| 5811 |
MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs") |
| 5812 |
// Azure Event Grid |
| 5813 |
MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid") |
| 5814 |
// Azure Event Hubs |
| 5815 |
MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs") |
| 5816 |
// Azure Service Bus |
| 5817 |
MessagingSystemServicebus = MessagingSystemKey.String("servicebus") |
| 5818 |
// Google Cloud Pub/Sub |
| 5819 |
MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub") |
| 5820 |
// Java Message Service |
| 5821 |
MessagingSystemJms = MessagingSystemKey.String("jms") |
| 5822 |
// Apache Kafka |
| 5823 |
MessagingSystemKafka = MessagingSystemKey.String("kafka") |
| 5824 |
// RabbitMQ |
| 5825 |
MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq") |
| 5826 |
// Apache RocketMQ |
| 5827 |
MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq") |
| 5828 |
// Apache Pulsar |
| 5829 |
MessagingSystemPulsar = MessagingSystemKey.String("pulsar") |
| 5830 |
) |
| 5831 |
|
| 5832 |
// MessagingBatchMessageCount returns an attribute KeyValue conforming to |
| 5833 |
// the "messaging.batch.message_count" semantic conventions. It represents the |
| 5834 |
// number of messages sent, received, or processed in the scope of the batching |
| 5835 |
// operation. |
| 5836 |
func MessagingBatchMessageCount(val int) attribute.KeyValue { |
| 5837 |
return MessagingBatchMessageCountKey.Int(val) |
| 5838 |
} |
| 5839 |
|
| 5840 |
// MessagingClientID returns an attribute KeyValue conforming to the |
| 5841 |
// "messaging.client.id" semantic conventions. It represents a unique |
| 5842 |
// identifier for the client that consumes or produces a message. |
| 5843 |
func MessagingClientID(val string) attribute.KeyValue { |
| 5844 |
return MessagingClientIDKey.String(val) |
| 5845 |
} |
| 5846 |
|
| 5847 |
// MessagingConsumerGroupName returns an attribute KeyValue conforming to |
| 5848 |
// the "messaging.consumer.group.name" semantic conventions. It represents the |
| 5849 |
// name of the consumer group with which a consumer is associated. |
| 5850 |
func MessagingConsumerGroupName(val string) attribute.KeyValue { |
| 5851 |
return MessagingConsumerGroupNameKey.String(val) |
| 5852 |
} |
| 5853 |
|
| 5854 |
// MessagingDestinationAnonymous returns an attribute KeyValue conforming to |
| 5855 |
// the "messaging.destination.anonymous" semantic conventions. It represents a |
| 5856 |
// boolean that is true if the message destination is anonymous (could be |
| 5857 |
// unnamed or have auto-generated name). |
| 5858 |
func MessagingDestinationAnonymous(val bool) attribute.KeyValue { |
| 5859 |
return MessagingDestinationAnonymousKey.Bool(val) |
| 5860 |
} |
| 5861 |
|
| 5862 |
// MessagingDestinationName returns an attribute KeyValue conforming to the |
| 5863 |
// "messaging.destination.name" semantic conventions. It represents the message |
| 5864 |
// destination name |
| 5865 |
func MessagingDestinationName(val string) attribute.KeyValue { |
| 5866 |
return MessagingDestinationNameKey.String(val) |
| 5867 |
} |
| 5868 |
|
| 5869 |
// MessagingDestinationPartitionID returns an attribute KeyValue conforming |
| 5870 |
// to the "messaging.destination.partition.id" semantic conventions. It |
| 5871 |
// represents the identifier of the partition messages are sent to or received |
| 5872 |
// from, unique within the `messaging.destination.name`. |
| 5873 |
func MessagingDestinationPartitionID(val string) attribute.KeyValue { |
| 5874 |
return MessagingDestinationPartitionIDKey.String(val) |
| 5875 |
} |
| 5876 |
|
| 5877 |
// MessagingDestinationSubscriptionName returns an attribute KeyValue |
| 5878 |
// conforming to the "messaging.destination.subscription.name" semantic |
| 5879 |
// conventions. It represents the name of the destination subscription from |
| 5880 |
// which a message is consumed. |
| 5881 |
func MessagingDestinationSubscriptionName(val string) attribute.KeyValue { |
| 5882 |
return MessagingDestinationSubscriptionNameKey.String(val) |
| 5883 |
} |
| 5884 |
|
| 5885 |
// MessagingDestinationTemplate returns an attribute KeyValue conforming to |
| 5886 |
// the "messaging.destination.template" semantic conventions. It represents the |
| 5887 |
// low cardinality representation of the messaging destination name |
| 5888 |
func MessagingDestinationTemplate(val string) attribute.KeyValue { |
| 5889 |
return MessagingDestinationTemplateKey.String(val) |
| 5890 |
} |
| 5891 |
|
| 5892 |
// MessagingDestinationTemporary returns an attribute KeyValue conforming to |
| 5893 |
// the "messaging.destination.temporary" semantic conventions. It represents a |
| 5894 |
// boolean that is true if the message destination is temporary and might not |
| 5895 |
// exist anymore after messages are processed. |
| 5896 |
func MessagingDestinationTemporary(val bool) attribute.KeyValue { |
| 5897 |
return MessagingDestinationTemporaryKey.Bool(val) |
| 5898 |
} |
| 5899 |
|
| 5900 |
// MessagingMessageBodySize returns an attribute KeyValue conforming to the |
| 5901 |
// "messaging.message.body.size" semantic conventions. It represents the size |
| 5902 |
// of the message body in bytes. |
| 5903 |
func MessagingMessageBodySize(val int) attribute.KeyValue { |
| 5904 |
return MessagingMessageBodySizeKey.Int(val) |
| 5905 |
} |
| 5906 |
|
| 5907 |
// MessagingMessageConversationID returns an attribute KeyValue conforming |
| 5908 |
// to the "messaging.message.conversation_id" semantic conventions. It |
| 5909 |
// represents the conversation ID identifying the conversation to which the |
| 5910 |
// message belongs, represented as a string. Sometimes called "Correlation ID". |
| 5911 |
func MessagingMessageConversationID(val string) attribute.KeyValue { |
| 5912 |
return MessagingMessageConversationIDKey.String(val) |
| 5913 |
} |
| 5914 |
|
| 5915 |
// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to |
| 5916 |
// the "messaging.message.envelope.size" semantic conventions. It represents |
| 5917 |
// the size of the message body and metadata in bytes. |
| 5918 |
func MessagingMessageEnvelopeSize(val int) attribute.KeyValue { |
| 5919 |
return MessagingMessageEnvelopeSizeKey.Int(val) |
| 5920 |
} |
| 5921 |
|
| 5922 |
// MessagingMessageID returns an attribute KeyValue conforming to the |
| 5923 |
// "messaging.message.id" semantic conventions. It represents a value used by |
| 5924 |
// the messaging system as an identifier for the message, represented as a |
| 5925 |
// string. |
| 5926 |
func MessagingMessageID(val string) attribute.KeyValue { |
| 5927 |
return MessagingMessageIDKey.String(val) |
| 5928 |
} |
| 5929 |
|
| 5930 |
// MessagingOperationName returns an attribute KeyValue conforming to the |
| 5931 |
// "messaging.operation.name" semantic conventions. It represents the |
| 5932 |
// system-specific name of the messaging operation. |
| 5933 |
func MessagingOperationName(val string) attribute.KeyValue { |
| 5934 |
return MessagingOperationNameKey.String(val) |
| 5935 |
} |
| 5936 |
|
| 5937 |
// This group describes attributes specific to Apache Kafka. |
| 5938 |
const ( |
| 5939 |
// MessagingKafkaMessageKeyKey is the attribute Key conforming to the |
| 5940 |
// "messaging.kafka.message.key" semantic conventions. It represents the |
| 5941 |
// message keys in Kafka are used for grouping alike messages to ensure |
| 5942 |
// they're processed on the same partition. They differ from |
| 5943 |
// `messaging.message.id` in that they're not unique. If the key is `null`, |
| 5944 |
// the attribute MUST NOT be set. |
| 5945 |
// |
| 5946 |
// Type: string |
| 5947 |
// RequirementLevel: Optional |
| 5948 |
// Stability: experimental |
| 5949 |
// Examples: 'myKey' |
| 5950 |
// Note: If the key type is not string, it's string representation has to |
| 5951 |
// be supplied for the attribute. If the key has no unambiguous, canonical |
| 5952 |
// string form, don't include its value. |
| 5953 |
MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") |
| 5954 |
|
| 5955 |
// MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the |
| 5956 |
// "messaging.kafka.message.tombstone" semantic conventions. It represents |
| 5957 |
// a boolean that is true if the message is a tombstone. |
| 5958 |
// |
| 5959 |
// Type: boolean |
| 5960 |
// RequirementLevel: Optional |
| 5961 |
// Stability: experimental |
| 5962 |
MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") |
| 5963 |
|
| 5964 |
// MessagingKafkaOffsetKey is the attribute Key conforming to the |
| 5965 |
// "messaging.kafka.offset" semantic conventions. It represents the offset |
| 5966 |
// of a record in the corresponding Kafka partition. |
| 5967 |
// |
| 5968 |
// Type: int |
| 5969 |
// RequirementLevel: Optional |
| 5970 |
// Stability: experimental |
| 5971 |
// Examples: 42 |
| 5972 |
MessagingKafkaOffsetKey = attribute.Key("messaging.kafka.offset") |
| 5973 |
) |
| 5974 |
|
| 5975 |
// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the |
| 5976 |
// "messaging.kafka.message.key" semantic conventions. It represents the |
| 5977 |
// message keys in Kafka are used for grouping alike messages to ensure they're |
| 5978 |
// processed on the same partition. They differ from `messaging.message.id` in |
| 5979 |
// that they're not unique. If the key is `null`, the attribute MUST NOT be |
| 5980 |
// set. |
| 5981 |
func MessagingKafkaMessageKey(val string) attribute.KeyValue { |
| 5982 |
return MessagingKafkaMessageKeyKey.String(val) |
| 5983 |
} |
| 5984 |
|
| 5985 |
// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming |
| 5986 |
// to the "messaging.kafka.message.tombstone" semantic conventions. It |
| 5987 |
// represents a boolean that is true if the message is a tombstone. |
| 5988 |
func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { |
| 5989 |
return MessagingKafkaMessageTombstoneKey.Bool(val) |
| 5990 |
} |
| 5991 |
|
| 5992 |
// MessagingKafkaOffset returns an attribute KeyValue conforming to the |
| 5993 |
// "messaging.kafka.offset" semantic conventions. It represents the offset of a |
| 5994 |
// record in the corresponding Kafka partition. |
| 5995 |
func MessagingKafkaOffset(val int) attribute.KeyValue { |
| 5996 |
return MessagingKafkaOffsetKey.Int(val) |
| 5997 |
} |
| 5998 |
|
| 5999 |
// This group describes attributes specific to RabbitMQ. |
| 6000 |
const ( |
| 6001 |
// MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key |
| 6002 |
// conforming to the "messaging.rabbitmq.destination.routing_key" semantic |
| 6003 |
// conventions. It represents the rabbitMQ message routing key. |
| 6004 |
// |
| 6005 |
// Type: string |
| 6006 |
// RequirementLevel: Optional |
| 6007 |
// Stability: experimental |
| 6008 |
// Examples: 'myKey' |
| 6009 |
MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") |
| 6010 |
|
| 6011 |
// MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming |
| 6012 |
// to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. |
| 6013 |
// It represents the rabbitMQ message delivery tag |
| 6014 |
// |
| 6015 |
// Type: int |
| 6016 |
// RequirementLevel: Optional |
| 6017 |
// Stability: experimental |
| 6018 |
// Examples: 123 |
| 6019 |
MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") |
| 6020 |
) |
| 6021 |
|
| 6022 |
// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue |
| 6023 |
// conforming to the "messaging.rabbitmq.destination.routing_key" semantic |
| 6024 |
// conventions. It represents the rabbitMQ message routing key. |
| 6025 |
func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { |
| 6026 |
return MessagingRabbitmqDestinationRoutingKeyKey.String(val) |
| 6027 |
} |
| 6028 |
|
| 6029 |
// MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue |
| 6030 |
// conforming to the "messaging.rabbitmq.message.delivery_tag" semantic |
| 6031 |
// conventions. It represents the rabbitMQ message delivery tag |
| 6032 |
func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue { |
| 6033 |
return MessagingRabbitmqMessageDeliveryTagKey.Int(val) |
| 6034 |
} |
| 6035 |
|
| 6036 |
// This group describes attributes specific to RocketMQ. |
| 6037 |
const ( |
| 6038 |
// MessagingRocketmqConsumptionModelKey is the attribute Key conforming to |
| 6039 |
// the "messaging.rocketmq.consumption_model" semantic conventions. It |
| 6040 |
// represents the model of message consumption. This only applies to |
| 6041 |
// consumer spans. |
| 6042 |
// |
| 6043 |
// Type: Enum |
| 6044 |
// RequirementLevel: Optional |
| 6045 |
// Stability: experimental |
| 6046 |
MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") |
| 6047 |
|
| 6048 |
// MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key |
| 6049 |
// conforming to the "messaging.rocketmq.message.delay_time_level" semantic |
| 6050 |
// conventions. It represents the delay time level for delay message, which |
| 6051 |
// determines the message delay time. |
| 6052 |
// |
| 6053 |
// Type: int |
| 6054 |
// RequirementLevel: Optional |
| 6055 |
// Stability: experimental |
| 6056 |
// Examples: 3 |
| 6057 |
MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") |
| 6058 |
|
| 6059 |
// MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key |
| 6060 |
// conforming to the "messaging.rocketmq.message.delivery_timestamp" |
| 6061 |
// semantic conventions. It represents the timestamp in milliseconds that |
| 6062 |
// the delay message is expected to be delivered to consumer. |
| 6063 |
// |
| 6064 |
// Type: int |
| 6065 |
// RequirementLevel: Optional |
| 6066 |
// Stability: experimental |
| 6067 |
// Examples: 1665987217045 |
| 6068 |
MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") |
| 6069 |
|
| 6070 |
// MessagingRocketmqMessageGroupKey is the attribute Key conforming to the |
| 6071 |
// "messaging.rocketmq.message.group" semantic conventions. It represents |
| 6072 |
// the it is essential for FIFO message. Messages that belong to the same |
| 6073 |
// message group are always processed one by one within the same consumer |
| 6074 |
// group. |
| 6075 |
// |
| 6076 |
// Type: string |
| 6077 |
// RequirementLevel: Optional |
| 6078 |
// Stability: experimental |
| 6079 |
// Examples: 'myMessageGroup' |
| 6080 |
MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") |
| 6081 |
|
| 6082 |
// MessagingRocketmqMessageKeysKey is the attribute Key conforming to the |
| 6083 |
// "messaging.rocketmq.message.keys" semantic conventions. It represents |
| 6084 |
// the key(s) of message, another way to mark message besides message id. |
| 6085 |
// |
| 6086 |
// Type: string[] |
| 6087 |
// RequirementLevel: Optional |
| 6088 |
// Stability: experimental |
| 6089 |
// Examples: 'keyA', 'keyB' |
| 6090 |
MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") |
| 6091 |
|
| 6092 |
// MessagingRocketmqMessageTagKey is the attribute Key conforming to the |
| 6093 |
// "messaging.rocketmq.message.tag" semantic conventions. It represents the |
| 6094 |
// secondary classifier of message besides topic. |
| 6095 |
// |
| 6096 |
// Type: string |
| 6097 |
// RequirementLevel: Optional |
| 6098 |
// Stability: experimental |
| 6099 |
// Examples: 'tagA' |
| 6100 |
MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") |
| 6101 |
|
| 6102 |
// MessagingRocketmqMessageTypeKey is the attribute Key conforming to the |
| 6103 |
// "messaging.rocketmq.message.type" semantic conventions. It represents |
| 6104 |
// the type of message. |
| 6105 |
// |
| 6106 |
// Type: Enum |
| 6107 |
// RequirementLevel: Optional |
| 6108 |
// Stability: experimental |
| 6109 |
MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") |
| 6110 |
|
| 6111 |
// MessagingRocketmqNamespaceKey is the attribute Key conforming to the |
| 6112 |
// "messaging.rocketmq.namespace" semantic conventions. It represents the |
| 6113 |
// namespace of RocketMQ resources, resources in different namespaces are |
| 6114 |
// individual. |
| 6115 |
// |
| 6116 |
// Type: string |
| 6117 |
// RequirementLevel: Optional |
| 6118 |
// Stability: experimental |
| 6119 |
// Examples: 'myNamespace' |
| 6120 |
MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") |
| 6121 |
) |
| 6122 |
|
| 6123 |
var ( |
| 6124 |
// Clustering consumption model |
| 6125 |
MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") |
| 6126 |
// Broadcasting consumption model |
| 6127 |
MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") |
| 6128 |
) |
| 6129 |
|
| 6130 |
var ( |
| 6131 |
// Normal message |
| 6132 |
MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") |
| 6133 |
// FIFO message |
| 6134 |
MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") |
| 6135 |
// Delay message |
| 6136 |
MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") |
| 6137 |
// Transaction message |
| 6138 |
MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") |
| 6139 |
) |
| 6140 |
|
| 6141 |
// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue |
| 6142 |
// conforming to the "messaging.rocketmq.message.delay_time_level" semantic |
| 6143 |
// conventions. It represents the delay time level for delay message, which |
| 6144 |
// determines the message delay time. |
| 6145 |
func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { |
| 6146 |
return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) |
| 6147 |
} |
| 6148 |
|
| 6149 |
// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue |
| 6150 |
// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic |
| 6151 |
// conventions. It represents the timestamp in milliseconds that the delay |
| 6152 |
// message is expected to be delivered to consumer. |
| 6153 |
func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { |
| 6154 |
return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) |
| 6155 |
} |
| 6156 |
|
| 6157 |
// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to |
| 6158 |
// the "messaging.rocketmq.message.group" semantic conventions. It represents |
| 6159 |
// the it is essential for FIFO message. Messages that belong to the same |
| 6160 |
// message group are always processed one by one within the same consumer |
| 6161 |
// group. |
| 6162 |
func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { |
| 6163 |
return MessagingRocketmqMessageGroupKey.String(val) |
| 6164 |
} |
| 6165 |
|
| 6166 |
// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to |
| 6167 |
// the "messaging.rocketmq.message.keys" semantic conventions. It represents |
| 6168 |
// the key(s) of message, another way to mark message besides message id. |
| 6169 |
func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { |
| 6170 |
return MessagingRocketmqMessageKeysKey.StringSlice(val) |
| 6171 |
} |
| 6172 |
|
| 6173 |
// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to |
| 6174 |
// the "messaging.rocketmq.message.tag" semantic conventions. It represents the |
| 6175 |
// secondary classifier of message besides topic. |
| 6176 |
func MessagingRocketmqMessageTag(val string) attribute.KeyValue { |
| 6177 |
return MessagingRocketmqMessageTagKey.String(val) |
| 6178 |
} |
| 6179 |
|
| 6180 |
// MessagingRocketmqNamespace returns an attribute KeyValue conforming to |
| 6181 |
// the "messaging.rocketmq.namespace" semantic conventions. It represents the |
| 6182 |
// namespace of RocketMQ resources, resources in different namespaces are |
| 6183 |
// individual. |
| 6184 |
func MessagingRocketmqNamespace(val string) attribute.KeyValue { |
| 6185 |
return MessagingRocketmqNamespaceKey.String(val) |
| 6186 |
} |
| 6187 |
|
| 6188 |
// This group describes attributes specific to GCP Pub/Sub. |
| 6189 |
const ( |
| 6190 |
// MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming |
| 6191 |
// to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. |
| 6192 |
// It represents the ack deadline in seconds set for the modify ack |
| 6193 |
// deadline request. |
| 6194 |
// |
| 6195 |
// Type: int |
| 6196 |
// RequirementLevel: Optional |
| 6197 |
// Stability: experimental |
| 6198 |
// Examples: 10 |
| 6199 |
MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline") |
| 6200 |
|
| 6201 |
// MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the |
| 6202 |
// "messaging.gcp_pubsub.message.ack_id" semantic conventions. It |
| 6203 |
// represents the ack id for a given message. |
| 6204 |
// |
| 6205 |
// Type: string |
| 6206 |
// RequirementLevel: Optional |
| 6207 |
// Stability: experimental |
| 6208 |
// Examples: 'ack_id' |
| 6209 |
MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id") |
| 6210 |
|
| 6211 |
// MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key |
| 6212 |
// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" |
| 6213 |
// semantic conventions. It represents the delivery attempt for a given |
| 6214 |
// message. |
| 6215 |
// |
| 6216 |
// Type: int |
| 6217 |
// RequirementLevel: Optional |
| 6218 |
// Stability: experimental |
| 6219 |
// Examples: 2 |
| 6220 |
MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt") |
| 6221 |
|
| 6222 |
// MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming |
| 6223 |
// to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. |
| 6224 |
// It represents the ordering key for a given message. If the attribute is |
| 6225 |
// not present, the message does not have an ordering key. |
| 6226 |
// |
| 6227 |
// Type: string |
| 6228 |
// RequirementLevel: Optional |
| 6229 |
// Stability: experimental |
| 6230 |
// Examples: 'ordering_key' |
| 6231 |
MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") |
| 6232 |
) |
| 6233 |
|
| 6234 |
// MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue |
| 6235 |
// conforming to the "messaging.gcp_pubsub.message.ack_deadline" semantic |
| 6236 |
// conventions. It represents the ack deadline in seconds set for the modify |
| 6237 |
// ack deadline request. |
| 6238 |
func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue { |
| 6239 |
return MessagingGCPPubsubMessageAckDeadlineKey.Int(val) |
| 6240 |
} |
| 6241 |
|
| 6242 |
// MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming |
| 6243 |
// to the "messaging.gcp_pubsub.message.ack_id" semantic conventions. It |
| 6244 |
// represents the ack id for a given message. |
| 6245 |
func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue { |
| 6246 |
return MessagingGCPPubsubMessageAckIDKey.String(val) |
| 6247 |
} |
| 6248 |
|
| 6249 |
// MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue |
| 6250 |
// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic |
| 6251 |
// conventions. It represents the delivery attempt for a given message. |
| 6252 |
func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue { |
| 6253 |
return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val) |
| 6254 |
} |
| 6255 |
|
| 6256 |
// MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue |
| 6257 |
// conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic |
| 6258 |
// conventions. It represents the ordering key for a given message. If the |
| 6259 |
// attribute is not present, the message does not have an ordering key. |
| 6260 |
func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue { |
| 6261 |
return MessagingGCPPubsubMessageOrderingKeyKey.String(val) |
| 6262 |
} |
| 6263 |
|
| 6264 |
// This group describes attributes specific to Azure Service Bus. |
| 6265 |
const ( |
| 6266 |
// MessagingServicebusDispositionStatusKey is the attribute Key conforming |
| 6267 |
// to the "messaging.servicebus.disposition_status" semantic conventions. |
| 6268 |
// It represents the describes the [settlement |
| 6269 |
// type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). |
| 6270 |
// |
| 6271 |
// Type: Enum |
| 6272 |
// RequirementLevel: Optional |
| 6273 |
// Stability: experimental |
| 6274 |
MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status") |
| 6275 |
|
| 6276 |
// MessagingServicebusMessageDeliveryCountKey is the attribute Key |
| 6277 |
// conforming to the "messaging.servicebus.message.delivery_count" semantic |
| 6278 |
// conventions. It represents the number of deliveries that have been |
| 6279 |
// attempted for this message. |
| 6280 |
// |
| 6281 |
// Type: int |
| 6282 |
// RequirementLevel: Optional |
| 6283 |
// Stability: experimental |
| 6284 |
// Examples: 2 |
| 6285 |
MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count") |
| 6286 |
|
| 6287 |
// MessagingServicebusMessageEnqueuedTimeKey is the attribute Key |
| 6288 |
// conforming to the "messaging.servicebus.message.enqueued_time" semantic |
| 6289 |
// conventions. It represents the UTC epoch seconds at which the message |
| 6290 |
// has been accepted and stored in the entity. |
| 6291 |
// |
| 6292 |
// Type: int |
| 6293 |
// RequirementLevel: Optional |
| 6294 |
// Stability: experimental |
| 6295 |
// Examples: 1701393730 |
| 6296 |
MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") |
| 6297 |
) |
| 6298 |
|
| 6299 |
var ( |
| 6300 |
// Message is completed |
| 6301 |
MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete") |
| 6302 |
// Message is abandoned |
| 6303 |
MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon") |
| 6304 |
// Message is sent to dead letter queue |
| 6305 |
MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter") |
| 6306 |
// Message is deferred |
| 6307 |
MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer") |
| 6308 |
) |
| 6309 |
|
| 6310 |
// MessagingServicebusMessageDeliveryCount returns an attribute KeyValue |
| 6311 |
// conforming to the "messaging.servicebus.message.delivery_count" semantic |
| 6312 |
// conventions. It represents the number of deliveries that have been attempted |
| 6313 |
// for this message. |
| 6314 |
func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue { |
| 6315 |
return MessagingServicebusMessageDeliveryCountKey.Int(val) |
| 6316 |
} |
| 6317 |
|
| 6318 |
// MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue |
| 6319 |
// conforming to the "messaging.servicebus.message.enqueued_time" semantic |
| 6320 |
// conventions. It represents the UTC epoch seconds at which the message has |
| 6321 |
// been accepted and stored in the entity. |
| 6322 |
func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue { |
| 6323 |
return MessagingServicebusMessageEnqueuedTimeKey.Int(val) |
| 6324 |
} |
| 6325 |
|
| 6326 |
// This group describes attributes specific to Azure Event Hubs. |
| 6327 |
const ( |
| 6328 |
// MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming |
| 6329 |
// to the "messaging.eventhubs.message.enqueued_time" semantic conventions. |
| 6330 |
// It represents the UTC epoch seconds at which the message has been |
| 6331 |
// accepted and stored in the entity. |
| 6332 |
// |
| 6333 |
// Type: int |
| 6334 |
// RequirementLevel: Optional |
| 6335 |
// Stability: experimental |
| 6336 |
// Examples: 1701393730 |
| 6337 |
MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") |
| 6338 |
) |
| 6339 |
|
| 6340 |
// MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue |
| 6341 |
// conforming to the "messaging.eventhubs.message.enqueued_time" semantic |
| 6342 |
// conventions. It represents the UTC epoch seconds at which the message has |
| 6343 |
// been accepted and stored in the entity. |
| 6344 |
func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue { |
| 6345 |
return MessagingEventhubsMessageEnqueuedTimeKey.Int(val) |
| 6346 |
} |
| 6347 |
|
| 6348 |
// These attributes may be used for any network related operation. |
| 6349 |
const ( |
| 6350 |
// NetworkCarrierIccKey is the attribute Key conforming to the |
| 6351 |
// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 |
| 6352 |
// alpha-2 2-character country code associated with the mobile carrier |
| 6353 |
// network. |
| 6354 |
// |
| 6355 |
// Type: string |
| 6356 |
// RequirementLevel: Optional |
| 6357 |
// Stability: experimental |
| 6358 |
// Examples: 'DE' |
| 6359 |
NetworkCarrierIccKey = attribute.Key("network.carrier.icc") |
| 6360 |
|
| 6361 |
// NetworkCarrierMccKey is the attribute Key conforming to the |
| 6362 |
// "network.carrier.mcc" semantic conventions. It represents the mobile |
| 6363 |
// carrier country code. |
| 6364 |
// |
| 6365 |
// Type: string |
| 6366 |
// RequirementLevel: Optional |
| 6367 |
// Stability: experimental |
| 6368 |
// Examples: '310' |
| 6369 |
NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") |
| 6370 |
|
| 6371 |
// NetworkCarrierMncKey is the attribute Key conforming to the |
| 6372 |
// "network.carrier.mnc" semantic conventions. It represents the mobile |
| 6373 |
// carrier network code. |
| 6374 |
// |
| 6375 |
// Type: string |
| 6376 |
// RequirementLevel: Optional |
| 6377 |
// Stability: experimental |
| 6378 |
// Examples: '001' |
| 6379 |
NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") |
| 6380 |
|
| 6381 |
// NetworkCarrierNameKey is the attribute Key conforming to the |
| 6382 |
// "network.carrier.name" semantic conventions. It represents the name of |
| 6383 |
// the mobile carrier. |
| 6384 |
// |
| 6385 |
// Type: string |
| 6386 |
// RequirementLevel: Optional |
| 6387 |
// Stability: experimental |
| 6388 |
// Examples: 'sprint' |
| 6389 |
NetworkCarrierNameKey = attribute.Key("network.carrier.name") |
| 6390 |
|
| 6391 |
// NetworkConnectionSubtypeKey is the attribute Key conforming to the |
| 6392 |
// "network.connection.subtype" semantic conventions. It represents the |
| 6393 |
// this describes more details regarding the connection.type. It may be the |
| 6394 |
// type of cell technology connection, but it could be used for describing |
| 6395 |
// details about a wifi connection. |
| 6396 |
// |
| 6397 |
// Type: Enum |
| 6398 |
// RequirementLevel: Optional |
| 6399 |
// Stability: experimental |
| 6400 |
// Examples: 'LTE' |
| 6401 |
NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") |
| 6402 |
|
| 6403 |
// NetworkConnectionTypeKey is the attribute Key conforming to the |
| 6404 |
// "network.connection.type" semantic conventions. It represents the |
| 6405 |
// internet connection type. |
| 6406 |
// |
| 6407 |
// Type: Enum |
| 6408 |
// RequirementLevel: Optional |
| 6409 |
// Stability: experimental |
| 6410 |
// Examples: 'wifi' |
| 6411 |
NetworkConnectionTypeKey = attribute.Key("network.connection.type") |
| 6412 |
|
| 6413 |
// NetworkIoDirectionKey is the attribute Key conforming to the |
| 6414 |
// "network.io.direction" semantic conventions. It represents the network |
| 6415 |
// IO operation direction. |
| 6416 |
// |
| 6417 |
// Type: Enum |
| 6418 |
// RequirementLevel: Optional |
| 6419 |
// Stability: experimental |
| 6420 |
// Examples: 'transmit' |
| 6421 |
NetworkIoDirectionKey = attribute.Key("network.io.direction") |
| 6422 |
|
| 6423 |
// NetworkLocalAddressKey is the attribute Key conforming to the |
| 6424 |
// "network.local.address" semantic conventions. It represents the local |
| 6425 |
// address of the network connection - IP address or Unix domain socket |
| 6426 |
// name. |
| 6427 |
// |
| 6428 |
// Type: string |
| 6429 |
// RequirementLevel: Optional |
| 6430 |
// Stability: stable |
| 6431 |
// Examples: '10.1.2.80', '/tmp/my.sock' |
| 6432 |
NetworkLocalAddressKey = attribute.Key("network.local.address") |
| 6433 |
|
| 6434 |
// NetworkLocalPortKey is the attribute Key conforming to the |
| 6435 |
// "network.local.port" semantic conventions. It represents the local port |
| 6436 |
// number of the network connection. |
| 6437 |
// |
| 6438 |
// Type: int |
| 6439 |
// RequirementLevel: Optional |
| 6440 |
// Stability: stable |
| 6441 |
// Examples: 65123 |
| 6442 |
NetworkLocalPortKey = attribute.Key("network.local.port") |
| 6443 |
|
| 6444 |
// NetworkPeerAddressKey is the attribute Key conforming to the |
| 6445 |
// "network.peer.address" semantic conventions. It represents the peer |
| 6446 |
// address of the network connection - IP address or Unix domain socket |
| 6447 |
// name. |
| 6448 |
// |
| 6449 |
// Type: string |
| 6450 |
// RequirementLevel: Optional |
| 6451 |
// Stability: stable |
| 6452 |
// Examples: '10.1.2.80', '/tmp/my.sock' |
| 6453 |
NetworkPeerAddressKey = attribute.Key("network.peer.address") |
| 6454 |
|
| 6455 |
// NetworkPeerPortKey is the attribute Key conforming to the |
| 6456 |
// "network.peer.port" semantic conventions. It represents the peer port |
| 6457 |
// number of the network connection. |
| 6458 |
// |
| 6459 |
// Type: int |
| 6460 |
// RequirementLevel: Optional |
| 6461 |
// Stability: stable |
| 6462 |
// Examples: 65123 |
| 6463 |
NetworkPeerPortKey = attribute.Key("network.peer.port") |
| 6464 |
|
| 6465 |
// NetworkProtocolNameKey is the attribute Key conforming to the |
| 6466 |
// "network.protocol.name" semantic conventions. It represents the [OSI |
| 6467 |
// application layer](https://osi-model.com/application-layer/) or non-OSI |
| 6468 |
// equivalent. |
| 6469 |
// |
| 6470 |
// Type: string |
| 6471 |
// RequirementLevel: Optional |
| 6472 |
// Stability: stable |
| 6473 |
// Examples: 'amqp', 'http', 'mqtt' |
| 6474 |
// Note: The value SHOULD be normalized to lowercase. |
| 6475 |
NetworkProtocolNameKey = attribute.Key("network.protocol.name") |
| 6476 |
|
| 6477 |
// NetworkProtocolVersionKey is the attribute Key conforming to the |
| 6478 |
// "network.protocol.version" semantic conventions. It represents the |
| 6479 |
// actual version of the protocol used for network communication. |
| 6480 |
// |
| 6481 |
// Type: string |
| 6482 |
// RequirementLevel: Optional |
| 6483 |
// Stability: stable |
| 6484 |
// Examples: '1.1', '2' |
| 6485 |
// Note: If protocol version is subject to negotiation (for example using |
| 6486 |
// [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute |
| 6487 |
// SHOULD be set to the negotiated version. If the actual protocol version |
| 6488 |
// is not known, this attribute SHOULD NOT be set. |
| 6489 |
NetworkProtocolVersionKey = attribute.Key("network.protocol.version") |
| 6490 |
|
| 6491 |
// NetworkTransportKey is the attribute Key conforming to the |
| 6492 |
// "network.transport" semantic conventions. It represents the [OSI |
| 6493 |
// transport layer](https://osi-model.com/transport-layer/) or |
| 6494 |
// [inter-process communication |
| 6495 |
// method](https://wikipedia.org/wiki/Inter-process_communication). |
| 6496 |
// |
| 6497 |
// Type: Enum |
| 6498 |
// RequirementLevel: Optional |
| 6499 |
// Stability: stable |
| 6500 |
// Examples: 'tcp', 'udp' |
| 6501 |
// Note: The value SHOULD be normalized to lowercase. |
| 6502 |
// |
| 6503 |
// Consider always setting the transport when setting a port number, since |
| 6504 |
// a port number is ambiguous without knowing the transport. For example |
| 6505 |
// different processes could be listening on TCP port 12345 and UDP port |
| 6506 |
// 12345. |
| 6507 |
NetworkTransportKey = attribute.Key("network.transport") |
| 6508 |
|
| 6509 |
// NetworkTypeKey is the attribute Key conforming to the "network.type" |
| 6510 |
// semantic conventions. It represents the [OSI network |
| 6511 |
// layer](https://osi-model.com/network-layer/) or non-OSI equivalent. |
| 6512 |
// |
| 6513 |
// Type: Enum |
| 6514 |
// RequirementLevel: Optional |
| 6515 |
// Stability: stable |
| 6516 |
// Examples: 'ipv4', 'ipv6' |
| 6517 |
// Note: The value SHOULD be normalized to lowercase. |
| 6518 |
NetworkTypeKey = attribute.Key("network.type") |
| 6519 |
) |
| 6520 |
|
| 6521 |
var ( |
| 6522 |
// GPRS |
| 6523 |
NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") |
| 6524 |
// EDGE |
| 6525 |
NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") |
| 6526 |
// UMTS |
| 6527 |
NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") |
| 6528 |
// CDMA |
| 6529 |
NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") |
| 6530 |
// EVDO Rel. 0 |
| 6531 |
NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") |
| 6532 |
// EVDO Rev. A |
| 6533 |
NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") |
| 6534 |
// CDMA2000 1XRTT |
| 6535 |
NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") |
| 6536 |
// HSDPA |
| 6537 |
NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") |
| 6538 |
// HSUPA |
| 6539 |
NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") |
| 6540 |
// HSPA |
| 6541 |
NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") |
| 6542 |
// IDEN |
| 6543 |
NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") |
| 6544 |
// EVDO Rev. B |
| 6545 |
NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") |
| 6546 |
// LTE |
| 6547 |
NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") |
| 6548 |
// EHRPD |
| 6549 |
NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") |
| 6550 |
// HSPAP |
| 6551 |
NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") |
| 6552 |
// GSM |
| 6553 |
NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") |
| 6554 |
// TD-SCDMA |
| 6555 |
NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") |
| 6556 |
// IWLAN |
| 6557 |
NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") |
| 6558 |
// 5G NR (New Radio) |
| 6559 |
NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") |
| 6560 |
// 5G NRNSA (New Radio Non-Standalone) |
| 6561 |
NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") |
| 6562 |
// LTE CA |
| 6563 |
NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") |
| 6564 |
) |
| 6565 |
|
| 6566 |
var ( |
| 6567 |
// wifi |
| 6568 |
NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") |
| 6569 |
// wired |
| 6570 |
NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") |
| 6571 |
// cell |
| 6572 |
NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") |
| 6573 |
// unavailable |
| 6574 |
NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") |
| 6575 |
// unknown |
| 6576 |
NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") |
| 6577 |
) |
| 6578 |
|
| 6579 |
var ( |
| 6580 |
// transmit |
| 6581 |
NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit") |
| 6582 |
// receive |
| 6583 |
NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive") |
| 6584 |
) |
| 6585 |
|
| 6586 |
var ( |
| 6587 |
// TCP |
| 6588 |
NetworkTransportTCP = NetworkTransportKey.String("tcp") |
| 6589 |
// UDP |
| 6590 |
NetworkTransportUDP = NetworkTransportKey.String("udp") |
| 6591 |
// Named or anonymous pipe |
| 6592 |
NetworkTransportPipe = NetworkTransportKey.String("pipe") |
| 6593 |
// Unix domain socket |
| 6594 |
NetworkTransportUnix = NetworkTransportKey.String("unix") |
| 6595 |
// QUIC |
| 6596 |
NetworkTransportQUIC = NetworkTransportKey.String("quic") |
| 6597 |
) |
| 6598 |
|
| 6599 |
var ( |
| 6600 |
// IPv4 |
| 6601 |
NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") |
| 6602 |
// IPv6 |
| 6603 |
NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") |
| 6604 |
) |
| 6605 |
|
| 6606 |
// NetworkCarrierIcc returns an attribute KeyValue conforming to the |
| 6607 |
// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 |
| 6608 |
// alpha-2 2-character country code associated with the mobile carrier network. |
| 6609 |
func NetworkCarrierIcc(val string) attribute.KeyValue { |
| 6610 |
return NetworkCarrierIccKey.String(val) |
| 6611 |
} |
| 6612 |
|
| 6613 |
// NetworkCarrierMcc returns an attribute KeyValue conforming to the |
| 6614 |
// "network.carrier.mcc" semantic conventions. It represents the mobile carrier |
| 6615 |
// country code. |
| 6616 |
func NetworkCarrierMcc(val string) attribute.KeyValue { |
| 6617 |
return NetworkCarrierMccKey.String(val) |
| 6618 |
} |
| 6619 |
|
| 6620 |
// NetworkCarrierMnc returns an attribute KeyValue conforming to the |
| 6621 |
// "network.carrier.mnc" semantic conventions. It represents the mobile carrier |
| 6622 |
// network code. |
| 6623 |
func NetworkCarrierMnc(val string) attribute.KeyValue { |
| 6624 |
return NetworkCarrierMncKey.String(val) |
| 6625 |
} |
| 6626 |
|
| 6627 |
// NetworkCarrierName returns an attribute KeyValue conforming to the |
| 6628 |
// "network.carrier.name" semantic conventions. It represents the name of the |
| 6629 |
// mobile carrier. |
| 6630 |
func NetworkCarrierName(val string) attribute.KeyValue { |
| 6631 |
return NetworkCarrierNameKey.String(val) |
| 6632 |
} |
| 6633 |
|
| 6634 |
// NetworkLocalAddress returns an attribute KeyValue conforming to the |
| 6635 |
// "network.local.address" semantic conventions. It represents the local |
| 6636 |
// address of the network connection - IP address or Unix domain socket name. |
| 6637 |
func NetworkLocalAddress(val string) attribute.KeyValue { |
| 6638 |
return NetworkLocalAddressKey.String(val) |
| 6639 |
} |
| 6640 |
|
| 6641 |
// NetworkLocalPort returns an attribute KeyValue conforming to the |
| 6642 |
// "network.local.port" semantic conventions. It represents the local port |
| 6643 |
// number of the network connection. |
| 6644 |
func NetworkLocalPort(val int) attribute.KeyValue { |
| 6645 |
return NetworkLocalPortKey.Int(val) |
| 6646 |
} |
| 6647 |
|
| 6648 |
// NetworkPeerAddress returns an attribute KeyValue conforming to the |
| 6649 |
// "network.peer.address" semantic conventions. It represents the peer address |
| 6650 |
// of the network connection - IP address or Unix domain socket name. |
| 6651 |
func NetworkPeerAddress(val string) attribute.KeyValue { |
| 6652 |
return NetworkPeerAddressKey.String(val) |
| 6653 |
} |
| 6654 |
|
| 6655 |
// NetworkPeerPort returns an attribute KeyValue conforming to the |
| 6656 |
// "network.peer.port" semantic conventions. It represents the peer port number |
| 6657 |
// of the network connection. |
| 6658 |
func NetworkPeerPort(val int) attribute.KeyValue { |
| 6659 |
return NetworkPeerPortKey.Int(val) |
| 6660 |
} |
| 6661 |
|
| 6662 |
// NetworkProtocolName returns an attribute KeyValue conforming to the |
| 6663 |
// "network.protocol.name" semantic conventions. It represents the [OSI |
| 6664 |
// application layer](https://osi-model.com/application-layer/) or non-OSI |
| 6665 |
// equivalent. |
| 6666 |
func NetworkProtocolName(val string) attribute.KeyValue { |
| 6667 |
return NetworkProtocolNameKey.String(val) |
| 6668 |
} |
| 6669 |
|
| 6670 |
// NetworkProtocolVersion returns an attribute KeyValue conforming to the |
| 6671 |
// "network.protocol.version" semantic conventions. It represents the actual |
| 6672 |
// version of the protocol used for network communication. |
| 6673 |
func NetworkProtocolVersion(val string) attribute.KeyValue { |
| 6674 |
return NetworkProtocolVersionKey.String(val) |
| 6675 |
} |
| 6676 |
|
| 6677 |
// An OCI image manifest. |
| 6678 |
const ( |
| 6679 |
// OciManifestDigestKey is the attribute Key conforming to the |
| 6680 |
// "oci.manifest.digest" semantic conventions. It represents the digest of |
| 6681 |
// the OCI image manifest. For container images specifically is the digest |
| 6682 |
// by which the container image is known. |
| 6683 |
// |
| 6684 |
// Type: string |
| 6685 |
// RequirementLevel: Optional |
| 6686 |
// Stability: experimental |
| 6687 |
// Examples: |
| 6688 |
// 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' |
| 6689 |
// Note: Follows [OCI Image Manifest |
| 6690 |
// Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), |
| 6691 |
// and specifically the [Digest |
| 6692 |
// property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). |
| 6693 |
// An example can be found in [Example Image |
| 6694 |
// Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). |
| 6695 |
OciManifestDigestKey = attribute.Key("oci.manifest.digest") |
| 6696 |
) |
| 6697 |
|
| 6698 |
// OciManifestDigest returns an attribute KeyValue conforming to the |
| 6699 |
// "oci.manifest.digest" semantic conventions. It represents the digest of the |
| 6700 |
// OCI image manifest. For container images specifically is the digest by which |
| 6701 |
// the container image is known. |
| 6702 |
func OciManifestDigest(val string) attribute.KeyValue { |
| 6703 |
return OciManifestDigestKey.String(val) |
| 6704 |
} |
| 6705 |
|
| 6706 |
// Attributes used by the OpenTracing Shim layer. |
| 6707 |
const ( |
| 6708 |
// OpentracingRefTypeKey is the attribute Key conforming to the |
| 6709 |
// "opentracing.ref_type" semantic conventions. It represents the |
| 6710 |
// parent-child Reference type |
| 6711 |
// |
| 6712 |
// Type: Enum |
| 6713 |
// RequirementLevel: Optional |
| 6714 |
// Stability: experimental |
| 6715 |
// Note: The causal relationship between a child Span and a parent Span. |
| 6716 |
OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") |
| 6717 |
) |
| 6718 |
|
| 6719 |
var ( |
| 6720 |
// The parent Span depends on the child Span in some capacity |
| 6721 |
OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") |
| 6722 |
// The parent Span doesn't depend in any way on the result of the child Span |
| 6723 |
OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") |
| 6724 |
) |
| 6725 |
|
| 6726 |
// The operating system (OS) on which the process represented by this resource |
| 6727 |
// is running. |
| 6728 |
const ( |
| 6729 |
// OSBuildIDKey is the attribute Key conforming to the "os.build_id" |
| 6730 |
// semantic conventions. It represents the unique identifier for a |
| 6731 |
// particular build or compilation of the operating system. |
| 6732 |
// |
| 6733 |
// Type: string |
| 6734 |
// RequirementLevel: Optional |
| 6735 |
// Stability: experimental |
| 6736 |
// Examples: 'TQ3C.230805.001.B2', '20E247', '22621' |
| 6737 |
OSBuildIDKey = attribute.Key("os.build_id") |
| 6738 |
|
| 6739 |
// OSDescriptionKey is the attribute Key conforming to the "os.description" |
| 6740 |
// semantic conventions. It represents the human readable (not intended to |
| 6741 |
// be parsed) OS version information, like e.g. reported by `ver` or |
| 6742 |
// `lsb_release -a` commands. |
| 6743 |
// |
| 6744 |
// Type: string |
| 6745 |
// RequirementLevel: Optional |
| 6746 |
// Stability: experimental |
| 6747 |
// Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 |
| 6748 |
// LTS' |
| 6749 |
OSDescriptionKey = attribute.Key("os.description") |
| 6750 |
|
| 6751 |
// OSNameKey is the attribute Key conforming to the "os.name" semantic |
| 6752 |
// conventions. It represents the human readable operating system name. |
| 6753 |
// |
| 6754 |
// Type: string |
| 6755 |
// RequirementLevel: Optional |
| 6756 |
// Stability: experimental |
| 6757 |
// Examples: 'iOS', 'Android', 'Ubuntu' |
| 6758 |
OSNameKey = attribute.Key("os.name") |
| 6759 |
|
| 6760 |
// OSTypeKey is the attribute Key conforming to the "os.type" semantic |
| 6761 |
// conventions. It represents the operating system type. |
| 6762 |
// |
| 6763 |
// Type: Enum |
| 6764 |
// RequirementLevel: Optional |
| 6765 |
// Stability: experimental |
| 6766 |
OSTypeKey = attribute.Key("os.type") |
| 6767 |
|
| 6768 |
// OSVersionKey is the attribute Key conforming to the "os.version" |
| 6769 |
// semantic conventions. It represents the version string of the operating |
| 6770 |
// system as defined in [Version |
| 6771 |
// Attributes](/docs/resource/README.md#version-attributes). |
| 6772 |
// |
| 6773 |
// Type: string |
| 6774 |
// RequirementLevel: Optional |
| 6775 |
// Stability: experimental |
| 6776 |
// Examples: '14.2.1', '18.04.1' |
| 6777 |
OSVersionKey = attribute.Key("os.version") |
| 6778 |
) |
| 6779 |
|
| 6780 |
var ( |
| 6781 |
// Microsoft Windows |
| 6782 |
OSTypeWindows = OSTypeKey.String("windows") |
| 6783 |
// Linux |
| 6784 |
OSTypeLinux = OSTypeKey.String("linux") |
| 6785 |
// Apple Darwin |
| 6786 |
OSTypeDarwin = OSTypeKey.String("darwin") |
| 6787 |
// FreeBSD |
| 6788 |
OSTypeFreeBSD = OSTypeKey.String("freebsd") |
| 6789 |
// NetBSD |
| 6790 |
OSTypeNetBSD = OSTypeKey.String("netbsd") |
| 6791 |
// OpenBSD |
| 6792 |
OSTypeOpenBSD = OSTypeKey.String("openbsd") |
| 6793 |
// DragonFly BSD |
| 6794 |
OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") |
| 6795 |
// HP-UX (Hewlett Packard Unix) |
| 6796 |
OSTypeHPUX = OSTypeKey.String("hpux") |
| 6797 |
// AIX (Advanced Interactive eXecutive) |
| 6798 |
OSTypeAIX = OSTypeKey.String("aix") |
| 6799 |
// SunOS, Oracle Solaris |
| 6800 |
OSTypeSolaris = OSTypeKey.String("solaris") |
| 6801 |
// IBM z/OS |
| 6802 |
OSTypeZOS = OSTypeKey.String("z_os") |
| 6803 |
) |
| 6804 |
|
| 6805 |
// OSBuildID returns an attribute KeyValue conforming to the "os.build_id" |
| 6806 |
// semantic conventions. It represents the unique identifier for a particular |
| 6807 |
// build or compilation of the operating system. |
| 6808 |
func OSBuildID(val string) attribute.KeyValue { |
| 6809 |
return OSBuildIDKey.String(val) |
| 6810 |
} |
| 6811 |
|
| 6812 |
// OSDescription returns an attribute KeyValue conforming to the |
| 6813 |
// "os.description" semantic conventions. It represents the human readable (not |
| 6814 |
// intended to be parsed) OS version information, like e.g. reported by `ver` |
| 6815 |
// or `lsb_release -a` commands. |
| 6816 |
func OSDescription(val string) attribute.KeyValue { |
| 6817 |
return OSDescriptionKey.String(val) |
| 6818 |
} |
| 6819 |
|
| 6820 |
// OSName returns an attribute KeyValue conforming to the "os.name" semantic |
| 6821 |
// conventions. It represents the human readable operating system name. |
| 6822 |
func OSName(val string) attribute.KeyValue { |
| 6823 |
return OSNameKey.String(val) |
| 6824 |
} |
| 6825 |
|
| 6826 |
// OSVersion returns an attribute KeyValue conforming to the "os.version" |
| 6827 |
// semantic conventions. It represents the version string of the operating |
| 6828 |
// system as defined in [Version |
| 6829 |
// Attributes](/docs/resource/README.md#version-attributes). |
| 6830 |
func OSVersion(val string) attribute.KeyValue { |
| 6831 |
return OSVersionKey.String(val) |
| 6832 |
} |
| 6833 |
|
| 6834 |
// Attributes reserved for OpenTelemetry |
| 6835 |
const ( |
| 6836 |
// OTelStatusCodeKey is the attribute Key conforming to the |
| 6837 |
// "otel.status_code" semantic conventions. It represents the name of the |
| 6838 |
// code, either "OK" or "ERROR". MUST NOT be set if the status code is |
| 6839 |
// UNSET. |
| 6840 |
// |
| 6841 |
// Type: Enum |
| 6842 |
// RequirementLevel: Optional |
| 6843 |
// Stability: stable |
| 6844 |
OTelStatusCodeKey = attribute.Key("otel.status_code") |
| 6845 |
|
| 6846 |
// OTelStatusDescriptionKey is the attribute Key conforming to the |
| 6847 |
// "otel.status_description" semantic conventions. It represents the |
| 6848 |
// description of the Status if it has a value, otherwise not set. |
| 6849 |
// |
| 6850 |
// Type: string |
| 6851 |
// RequirementLevel: Optional |
| 6852 |
// Stability: stable |
| 6853 |
// Examples: 'resource not found' |
| 6854 |
OTelStatusDescriptionKey = attribute.Key("otel.status_description") |
| 6855 |
) |
| 6856 |
|
| 6857 |
var ( |
| 6858 |
// The operation has been validated by an Application developer or Operator to have completed successfully |
| 6859 |
OTelStatusCodeOk = OTelStatusCodeKey.String("OK") |
| 6860 |
// The operation contains an error |
| 6861 |
OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") |
| 6862 |
) |
| 6863 |
|
| 6864 |
// OTelStatusDescription returns an attribute KeyValue conforming to the |
| 6865 |
// "otel.status_description" semantic conventions. It represents the |
| 6866 |
// description of the Status if it has a value, otherwise not set. |
| 6867 |
func OTelStatusDescription(val string) attribute.KeyValue { |
| 6868 |
return OTelStatusDescriptionKey.String(val) |
| 6869 |
} |
| 6870 |
|
| 6871 |
// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's |
| 6872 |
// concepts. |
| 6873 |
const ( |
| 6874 |
// OTelScopeNameKey is the attribute Key conforming to the |
| 6875 |
// "otel.scope.name" semantic conventions. It represents the name of the |
| 6876 |
// instrumentation scope - (`InstrumentationScope.Name` in OTLP). |
| 6877 |
// |
| 6878 |
// Type: string |
| 6879 |
// RequirementLevel: Optional |
| 6880 |
// Stability: stable |
| 6881 |
// Examples: 'io.opentelemetry.contrib.mongodb' |
| 6882 |
OTelScopeNameKey = attribute.Key("otel.scope.name") |
| 6883 |
|
| 6884 |
// OTelScopeVersionKey is the attribute Key conforming to the |
| 6885 |
// "otel.scope.version" semantic conventions. It represents the version of |
| 6886 |
// the instrumentation scope - (`InstrumentationScope.Version` in OTLP). |
| 6887 |
// |
| 6888 |
// Type: string |
| 6889 |
// RequirementLevel: Optional |
| 6890 |
// Stability: stable |
| 6891 |
// Examples: '1.0.0' |
| 6892 |
OTelScopeVersionKey = attribute.Key("otel.scope.version") |
| 6893 |
) |
| 6894 |
|
| 6895 |
// OTelScopeName returns an attribute KeyValue conforming to the |
| 6896 |
// "otel.scope.name" semantic conventions. It represents the name of the |
| 6897 |
// instrumentation scope - (`InstrumentationScope.Name` in OTLP). |
| 6898 |
func OTelScopeName(val string) attribute.KeyValue { |
| 6899 |
return OTelScopeNameKey.String(val) |
| 6900 |
} |
| 6901 |
|
| 6902 |
// OTelScopeVersion returns an attribute KeyValue conforming to the |
| 6903 |
// "otel.scope.version" semantic conventions. It represents the version of the |
| 6904 |
// instrumentation scope - (`InstrumentationScope.Version` in OTLP). |
| 6905 |
func OTelScopeVersion(val string) attribute.KeyValue { |
| 6906 |
return OTelScopeVersionKey.String(val) |
| 6907 |
} |
| 6908 |
|
| 6909 |
// Operations that access some remote service. |
| 6910 |
const ( |
| 6911 |
// PeerServiceKey is the attribute Key conforming to the "peer.service" |
| 6912 |
// semantic conventions. It represents the |
| 6913 |
// [`service.name`](/docs/resource/README.md#service) of the remote |
| 6914 |
// service. SHOULD be equal to the actual `service.name` resource attribute |
| 6915 |
// of the remote service if any. |
| 6916 |
// |
| 6917 |
// Type: string |
| 6918 |
// RequirementLevel: Optional |
| 6919 |
// Stability: experimental |
| 6920 |
// Examples: 'AuthTokenCache' |
| 6921 |
PeerServiceKey = attribute.Key("peer.service") |
| 6922 |
) |
| 6923 |
|
| 6924 |
// PeerService returns an attribute KeyValue conforming to the |
| 6925 |
// "peer.service" semantic conventions. It represents the |
| 6926 |
// [`service.name`](/docs/resource/README.md#service) of the remote service. |
| 6927 |
// SHOULD be equal to the actual `service.name` resource attribute of the |
| 6928 |
// remote service if any. |
| 6929 |
func PeerService(val string) attribute.KeyValue { |
| 6930 |
return PeerServiceKey.String(val) |
| 6931 |
} |
| 6932 |
|
| 6933 |
// An operating system process. |
| 6934 |
const ( |
| 6935 |
// ProcessCommandKey is the attribute Key conforming to the |
| 6936 |
// "process.command" semantic conventions. It represents the command used |
| 6937 |
// to launch the process (i.e. the command name). On Linux based systems, |
| 6938 |
// can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can |
| 6939 |
// be set to the first parameter extracted from `GetCommandLineW`. |
| 6940 |
// |
| 6941 |
// Type: string |
| 6942 |
// RequirementLevel: Optional |
| 6943 |
// Stability: experimental |
| 6944 |
// Examples: 'cmd/otelcol' |
| 6945 |
ProcessCommandKey = attribute.Key("process.command") |
| 6946 |
|
| 6947 |
// ProcessCommandArgsKey is the attribute Key conforming to the |
| 6948 |
// "process.command_args" semantic conventions. It represents the all the |
| 6949 |
// command arguments (including the command/executable itself) as received |
| 6950 |
// by the process. On Linux-based systems (and some other Unixoid systems |
| 6951 |
// supporting procfs), can be set according to the list of null-delimited |
| 6952 |
// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, |
| 6953 |
// this would be the full argv vector passed to `main`. |
| 6954 |
// |
| 6955 |
// Type: string[] |
| 6956 |
// RequirementLevel: Optional |
| 6957 |
// Stability: experimental |
| 6958 |
// Examples: 'cmd/otecol', '--config=config.yaml' |
| 6959 |
ProcessCommandArgsKey = attribute.Key("process.command_args") |
| 6960 |
|
| 6961 |
// ProcessCommandLineKey is the attribute Key conforming to the |
| 6962 |
// "process.command_line" semantic conventions. It represents the full |
| 6963 |
// command used to launch the process as a single string representing the |
| 6964 |
// full command. On Windows, can be set to the result of `GetCommandLineW`. |
| 6965 |
// Do not set this if you have to assemble it just for monitoring; use |
| 6966 |
// `process.command_args` instead. |
| 6967 |
// |
| 6968 |
// Type: string |
| 6969 |
// RequirementLevel: Optional |
| 6970 |
// Stability: experimental |
| 6971 |
// Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' |
| 6972 |
ProcessCommandLineKey = attribute.Key("process.command_line") |
| 6973 |
|
| 6974 |
// ProcessContextSwitchTypeKey is the attribute Key conforming to the |
| 6975 |
// "process.context_switch_type" semantic conventions. It represents the |
| 6976 |
// specifies whether the context switches for this data point were |
| 6977 |
// voluntary or involuntary. |
| 6978 |
// |
| 6979 |
// Type: Enum |
| 6980 |
// RequirementLevel: Optional |
| 6981 |
// Stability: experimental |
| 6982 |
ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type") |
| 6983 |
|
| 6984 |
// ProcessCreationTimeKey is the attribute Key conforming to the |
| 6985 |
// "process.creation.time" semantic conventions. It represents the date and |
| 6986 |
// time the process was created, in ISO 8601 format. |
| 6987 |
// |
| 6988 |
// Type: string |
| 6989 |
// RequirementLevel: Optional |
| 6990 |
// Stability: experimental |
| 6991 |
// Examples: '2023-11-21T09:25:34.853Z' |
| 6992 |
ProcessCreationTimeKey = attribute.Key("process.creation.time") |
| 6993 |
|
| 6994 |
// ProcessExecutableNameKey is the attribute Key conforming to the |
| 6995 |
// "process.executable.name" semantic conventions. It represents the name |
| 6996 |
// of the process executable. On Linux based systems, can be set to the |
| 6997 |
// `Name` in `proc/[pid]/status`. On Windows, can be set to the base name |
| 6998 |
// of `GetProcessImageFileNameW`. |
| 6999 |
// |
| 7000 |
// Type: string |
| 7001 |
// RequirementLevel: Optional |
| 7002 |
// Stability: experimental |
| 7003 |
// Examples: 'otelcol' |
| 7004 |
ProcessExecutableNameKey = attribute.Key("process.executable.name") |
| 7005 |
|
| 7006 |
// ProcessExecutablePathKey is the attribute Key conforming to the |
| 7007 |
// "process.executable.path" semantic conventions. It represents the full |
| 7008 |
// path to the process executable. On Linux based systems, can be set to |
| 7009 |
// the target of `proc/[pid]/exe`. On Windows, can be set to the result of |
| 7010 |
// `GetProcessImageFileNameW`. |
| 7011 |
// |
| 7012 |
// Type: string |
| 7013 |
// RequirementLevel: Optional |
| 7014 |
// Stability: experimental |
| 7015 |
// Examples: '/usr/bin/cmd/otelcol' |
| 7016 |
ProcessExecutablePathKey = attribute.Key("process.executable.path") |
| 7017 |
|
| 7018 |
// ProcessExitCodeKey is the attribute Key conforming to the |
| 7019 |
// "process.exit.code" semantic conventions. It represents the exit code of |
| 7020 |
// the process. |
| 7021 |
// |
| 7022 |
// Type: int |
| 7023 |
// RequirementLevel: Optional |
| 7024 |
// Stability: experimental |
| 7025 |
// Examples: 127 |
| 7026 |
ProcessExitCodeKey = attribute.Key("process.exit.code") |
| 7027 |
|
| 7028 |
// ProcessExitTimeKey is the attribute Key conforming to the |
| 7029 |
// "process.exit.time" semantic conventions. It represents the date and |
| 7030 |
// time the process exited, in ISO 8601 format. |
| 7031 |
// |
| 7032 |
// Type: string |
| 7033 |
// RequirementLevel: Optional |
| 7034 |
// Stability: experimental |
| 7035 |
// Examples: '2023-11-21T09:26:12.315Z' |
| 7036 |
ProcessExitTimeKey = attribute.Key("process.exit.time") |
| 7037 |
|
| 7038 |
// ProcessGroupLeaderPIDKey is the attribute Key conforming to the |
| 7039 |
// "process.group_leader.pid" semantic conventions. It represents the PID |
| 7040 |
// of the process's group leader. This is also the process group ID (PGID) |
| 7041 |
// of the process. |
| 7042 |
// |
| 7043 |
// Type: int |
| 7044 |
// RequirementLevel: Optional |
| 7045 |
// Stability: experimental |
| 7046 |
// Examples: 23 |
| 7047 |
ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid") |
| 7048 |
|
| 7049 |
// ProcessInteractiveKey is the attribute Key conforming to the |
| 7050 |
// "process.interactive" semantic conventions. It represents the whether |
| 7051 |
// the process is connected to an interactive shell. |
| 7052 |
// |
| 7053 |
// Type: boolean |
| 7054 |
// RequirementLevel: Optional |
| 7055 |
// Stability: experimental |
| 7056 |
ProcessInteractiveKey = attribute.Key("process.interactive") |
| 7057 |
|
| 7058 |
// ProcessOwnerKey is the attribute Key conforming to the "process.owner" |
| 7059 |
// semantic conventions. It represents the username of the user that owns |
| 7060 |
// the process. |
| 7061 |
// |
| 7062 |
// Type: string |
| 7063 |
// RequirementLevel: Optional |
| 7064 |
// Stability: experimental |
| 7065 |
// Examples: 'root' |
| 7066 |
ProcessOwnerKey = attribute.Key("process.owner") |
| 7067 |
|
| 7068 |
// ProcessPagingFaultTypeKey is the attribute Key conforming to the |
| 7069 |
// "process.paging.fault_type" semantic conventions. It represents the type |
| 7070 |
// of page fault for this data point. Type `major` is for major/hard page |
| 7071 |
// faults, and `minor` is for minor/soft page faults. |
| 7072 |
// |
| 7073 |
// Type: Enum |
| 7074 |
// RequirementLevel: Optional |
| 7075 |
// Stability: experimental |
| 7076 |
ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type") |
| 7077 |
|
| 7078 |
// ProcessParentPIDKey is the attribute Key conforming to the |
| 7079 |
// "process.parent_pid" semantic conventions. It represents the parent |
| 7080 |
// Process identifier (PPID). |
| 7081 |
// |
| 7082 |
// Type: int |
| 7083 |
// RequirementLevel: Optional |
| 7084 |
// Stability: experimental |
| 7085 |
// Examples: 111 |
| 7086 |
ProcessParentPIDKey = attribute.Key("process.parent_pid") |
| 7087 |
|
| 7088 |
// ProcessPIDKey is the attribute Key conforming to the "process.pid" |
| 7089 |
// semantic conventions. It represents the process identifier (PID). |
| 7090 |
// |
| 7091 |
// Type: int |
| 7092 |
// RequirementLevel: Optional |
| 7093 |
// Stability: experimental |
| 7094 |
// Examples: 1234 |
| 7095 |
ProcessPIDKey = attribute.Key("process.pid") |
| 7096 |
|
| 7097 |
// ProcessRealUserIDKey is the attribute Key conforming to the |
| 7098 |
// "process.real_user.id" semantic conventions. It represents the real user |
| 7099 |
// ID (RUID) of the process. |
| 7100 |
// |
| 7101 |
// Type: int |
| 7102 |
// RequirementLevel: Optional |
| 7103 |
// Stability: experimental |
| 7104 |
// Examples: 1000 |
| 7105 |
ProcessRealUserIDKey = attribute.Key("process.real_user.id") |
| 7106 |
|
| 7107 |
// ProcessRealUserNameKey is the attribute Key conforming to the |
| 7108 |
// "process.real_user.name" semantic conventions. It represents the |
| 7109 |
// username of the real user of the process. |
| 7110 |
// |
| 7111 |
// Type: string |
| 7112 |
// RequirementLevel: Optional |
| 7113 |
// Stability: experimental |
| 7114 |
// Examples: 'operator' |
| 7115 |
ProcessRealUserNameKey = attribute.Key("process.real_user.name") |
| 7116 |
|
| 7117 |
// ProcessRuntimeDescriptionKey is the attribute Key conforming to the |
| 7118 |
// "process.runtime.description" semantic conventions. It represents an |
| 7119 |
// additional description about the runtime of the process, for example a |
| 7120 |
// specific vendor customization of the runtime environment. |
| 7121 |
// |
| 7122 |
// Type: string |
| 7123 |
// RequirementLevel: Optional |
| 7124 |
// Stability: experimental |
| 7125 |
// Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' |
| 7126 |
ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") |
| 7127 |
|
| 7128 |
// ProcessRuntimeNameKey is the attribute Key conforming to the |
| 7129 |
// "process.runtime.name" semantic conventions. It represents the name of |
| 7130 |
// the runtime of this process. |
| 7131 |
// |
| 7132 |
// Type: string |
| 7133 |
// RequirementLevel: Optional |
| 7134 |
// Stability: experimental |
| 7135 |
// Examples: 'OpenJDK Runtime Environment' |
| 7136 |
ProcessRuntimeNameKey = attribute.Key("process.runtime.name") |
| 7137 |
|
| 7138 |
// ProcessRuntimeVersionKey is the attribute Key conforming to the |
| 7139 |
// "process.runtime.version" semantic conventions. It represents the |
| 7140 |
// version of the runtime of this process, as returned by the runtime |
| 7141 |
// without modification. |
| 7142 |
// |
| 7143 |
// Type: string |
| 7144 |
// RequirementLevel: Optional |
| 7145 |
// Stability: experimental |
| 7146 |
// Examples: '14.0.2' |
| 7147 |
ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") |
| 7148 |
|
| 7149 |
// ProcessSavedUserIDKey is the attribute Key conforming to the |
| 7150 |
// "process.saved_user.id" semantic conventions. It represents the saved |
| 7151 |
// user ID (SUID) of the process. |
| 7152 |
// |
| 7153 |
// Type: int |
| 7154 |
// RequirementLevel: Optional |
| 7155 |
// Stability: experimental |
| 7156 |
// Examples: 1002 |
| 7157 |
ProcessSavedUserIDKey = attribute.Key("process.saved_user.id") |
| 7158 |
|
| 7159 |
// ProcessSavedUserNameKey is the attribute Key conforming to the |
| 7160 |
// "process.saved_user.name" semantic conventions. It represents the |
| 7161 |
// username of the saved user. |
| 7162 |
// |
| 7163 |
// Type: string |
| 7164 |
// RequirementLevel: Optional |
| 7165 |
// Stability: experimental |
| 7166 |
// Examples: 'operator' |
| 7167 |
ProcessSavedUserNameKey = attribute.Key("process.saved_user.name") |
| 7168 |
|
| 7169 |
// ProcessSessionLeaderPIDKey is the attribute Key conforming to the |
| 7170 |
// "process.session_leader.pid" semantic conventions. It represents the PID |
| 7171 |
// of the process's session leader. This is also the session ID (SID) of |
| 7172 |
// the process. |
| 7173 |
// |
| 7174 |
// Type: int |
| 7175 |
// RequirementLevel: Optional |
| 7176 |
// Stability: experimental |
| 7177 |
// Examples: 14 |
| 7178 |
ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid") |
| 7179 |
|
| 7180 |
// ProcessUserIDKey is the attribute Key conforming to the |
| 7181 |
// "process.user.id" semantic conventions. It represents the effective user |
| 7182 |
// ID (EUID) of the process. |
| 7183 |
// |
| 7184 |
// Type: int |
| 7185 |
// RequirementLevel: Optional |
| 7186 |
// Stability: experimental |
| 7187 |
// Examples: 1001 |
| 7188 |
ProcessUserIDKey = attribute.Key("process.user.id") |
| 7189 |
|
| 7190 |
// ProcessUserNameKey is the attribute Key conforming to the |
| 7191 |
// "process.user.name" semantic conventions. It represents the username of |
| 7192 |
// the effective user of the process. |
| 7193 |
// |
| 7194 |
// Type: string |
| 7195 |
// RequirementLevel: Optional |
| 7196 |
// Stability: experimental |
| 7197 |
// Examples: 'root' |
| 7198 |
ProcessUserNameKey = attribute.Key("process.user.name") |
| 7199 |
|
| 7200 |
// ProcessVpidKey is the attribute Key conforming to the "process.vpid" |
| 7201 |
// semantic conventions. It represents the virtual process identifier. |
| 7202 |
// |
| 7203 |
// Type: int |
| 7204 |
// RequirementLevel: Optional |
| 7205 |
// Stability: experimental |
| 7206 |
// Examples: 12 |
| 7207 |
// Note: The process ID within a PID namespace. This is not necessarily |
| 7208 |
// unique across all processes on the host but it is unique within the |
| 7209 |
// process namespace that the process exists within. |
| 7210 |
ProcessVpidKey = attribute.Key("process.vpid") |
| 7211 |
) |
| 7212 |
|
| 7213 |
var ( |
| 7214 |
// voluntary |
| 7215 |
ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary") |
| 7216 |
// involuntary |
| 7217 |
ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary") |
| 7218 |
) |
| 7219 |
|
| 7220 |
var ( |
| 7221 |
// major |
| 7222 |
ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major") |
| 7223 |
// minor |
| 7224 |
ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor") |
| 7225 |
) |
| 7226 |
|
| 7227 |
// ProcessCommand returns an attribute KeyValue conforming to the |
| 7228 |
// "process.command" semantic conventions. It represents the command used to |
| 7229 |
// launch the process (i.e. the command name). On Linux based systems, can be |
| 7230 |
// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to |
| 7231 |
// the first parameter extracted from `GetCommandLineW`. |
| 7232 |
func ProcessCommand(val string) attribute.KeyValue { |
| 7233 |
return ProcessCommandKey.String(val) |
| 7234 |
} |
| 7235 |
|
| 7236 |
// ProcessCommandArgs returns an attribute KeyValue conforming to the |
| 7237 |
// "process.command_args" semantic conventions. It represents the all the |
| 7238 |
// command arguments (including the command/executable itself) as received by |
| 7239 |
// the process. On Linux-based systems (and some other Unixoid systems |
| 7240 |
// supporting procfs), can be set according to the list of null-delimited |
| 7241 |
// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, |
| 7242 |
// this would be the full argv vector passed to `main`. |
| 7243 |
func ProcessCommandArgs(val ...string) attribute.KeyValue { |
| 7244 |
return ProcessCommandArgsKey.StringSlice(val) |
| 7245 |
} |
| 7246 |
|
| 7247 |
// ProcessCommandLine returns an attribute KeyValue conforming to the |
| 7248 |
// "process.command_line" semantic conventions. It represents the full command |
| 7249 |
// used to launch the process as a single string representing the full command. |
| 7250 |
// On Windows, can be set to the result of `GetCommandLineW`. Do not set this |
| 7251 |
// if you have to assemble it just for monitoring; use `process.command_args` |
| 7252 |
// instead. |
| 7253 |
func ProcessCommandLine(val string) attribute.KeyValue { |
| 7254 |
return ProcessCommandLineKey.String(val) |
| 7255 |
} |
| 7256 |
|
| 7257 |
// ProcessCreationTime returns an attribute KeyValue conforming to the |
| 7258 |
// "process.creation.time" semantic conventions. It represents the date and |
| 7259 |
// time the process was created, in ISO 8601 format. |
| 7260 |
func ProcessCreationTime(val string) attribute.KeyValue { |
| 7261 |
return ProcessCreationTimeKey.String(val) |
| 7262 |
} |
| 7263 |
|
| 7264 |
// ProcessExecutableName returns an attribute KeyValue conforming to the |
| 7265 |
// "process.executable.name" semantic conventions. It represents the name of |
| 7266 |
// the process executable. On Linux based systems, can be set to the `Name` in |
| 7267 |
// `proc/[pid]/status`. On Windows, can be set to the base name of |
| 7268 |
// `GetProcessImageFileNameW`. |
| 7269 |
func ProcessExecutableName(val string) attribute.KeyValue { |
| 7270 |
return ProcessExecutableNameKey.String(val) |
| 7271 |
} |
| 7272 |
|
| 7273 |
// ProcessExecutablePath returns an attribute KeyValue conforming to the |
| 7274 |
// "process.executable.path" semantic conventions. It represents the full path |
| 7275 |
// to the process executable. On Linux based systems, can be set to the target |
| 7276 |
// of `proc/[pid]/exe`. On Windows, can be set to the result of |
| 7277 |
// `GetProcessImageFileNameW`. |
| 7278 |
func ProcessExecutablePath(val string) attribute.KeyValue { |
| 7279 |
return ProcessExecutablePathKey.String(val) |
| 7280 |
} |
| 7281 |
|
| 7282 |
// ProcessExitCode returns an attribute KeyValue conforming to the |
| 7283 |
// "process.exit.code" semantic conventions. It represents the exit code of the |
| 7284 |
// process. |
| 7285 |
func ProcessExitCode(val int) attribute.KeyValue { |
| 7286 |
return ProcessExitCodeKey.Int(val) |
| 7287 |
} |
| 7288 |
|
| 7289 |
// ProcessExitTime returns an attribute KeyValue conforming to the |
| 7290 |
// "process.exit.time" semantic conventions. It represents the date and time |
| 7291 |
// the process exited, in ISO 8601 format. |
| 7292 |
func ProcessExitTime(val string) attribute.KeyValue { |
| 7293 |
return ProcessExitTimeKey.String(val) |
| 7294 |
} |
| 7295 |
|
| 7296 |
// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the |
| 7297 |
// "process.group_leader.pid" semantic conventions. It represents the PID of |
| 7298 |
// the process's group leader. This is also the process group ID (PGID) of the |
| 7299 |
// process. |
| 7300 |
func ProcessGroupLeaderPID(val int) attribute.KeyValue { |
| 7301 |
return ProcessGroupLeaderPIDKey.Int(val) |
| 7302 |
} |
| 7303 |
|
| 7304 |
// ProcessInteractive returns an attribute KeyValue conforming to the |
| 7305 |
// "process.interactive" semantic conventions. It represents the whether the |
| 7306 |
// process is connected to an interactive shell. |
| 7307 |
func ProcessInteractive(val bool) attribute.KeyValue { |
| 7308 |
return ProcessInteractiveKey.Bool(val) |
| 7309 |
} |
| 7310 |
|
| 7311 |
// ProcessOwner returns an attribute KeyValue conforming to the |
| 7312 |
// "process.owner" semantic conventions. It represents the username of the user |
| 7313 |
// that owns the process. |
| 7314 |
func ProcessOwner(val string) attribute.KeyValue { |
| 7315 |
return ProcessOwnerKey.String(val) |
| 7316 |
} |
| 7317 |
|
| 7318 |
// ProcessParentPID returns an attribute KeyValue conforming to the |
| 7319 |
// "process.parent_pid" semantic conventions. It represents the parent Process |
| 7320 |
// identifier (PPID). |
| 7321 |
func ProcessParentPID(val int) attribute.KeyValue { |
| 7322 |
return ProcessParentPIDKey.Int(val) |
| 7323 |
} |
| 7324 |
|
| 7325 |
// ProcessPID returns an attribute KeyValue conforming to the "process.pid" |
| 7326 |
// semantic conventions. It represents the process identifier (PID). |
| 7327 |
func ProcessPID(val int) attribute.KeyValue { |
| 7328 |
return ProcessPIDKey.Int(val) |
| 7329 |
} |
| 7330 |
|
| 7331 |
// ProcessRealUserID returns an attribute KeyValue conforming to the |
| 7332 |
// "process.real_user.id" semantic conventions. It represents the real user ID |
| 7333 |
// (RUID) of the process. |
| 7334 |
func ProcessRealUserID(val int) attribute.KeyValue { |
| 7335 |
return ProcessRealUserIDKey.Int(val) |
| 7336 |
} |
| 7337 |
|
| 7338 |
// ProcessRealUserName returns an attribute KeyValue conforming to the |
| 7339 |
// "process.real_user.name" semantic conventions. It represents the username of |
| 7340 |
// the real user of the process. |
| 7341 |
func ProcessRealUserName(val string) attribute.KeyValue { |
| 7342 |
return ProcessRealUserNameKey.String(val) |
| 7343 |
} |
| 7344 |
|
| 7345 |
// ProcessRuntimeDescription returns an attribute KeyValue conforming to the |
| 7346 |
// "process.runtime.description" semantic conventions. It represents an |
| 7347 |
// additional description about the runtime of the process, for example a |
| 7348 |
// specific vendor customization of the runtime environment. |
| 7349 |
func ProcessRuntimeDescription(val string) attribute.KeyValue { |
| 7350 |
return ProcessRuntimeDescriptionKey.String(val) |
| 7351 |
} |
| 7352 |
|
| 7353 |
// ProcessRuntimeName returns an attribute KeyValue conforming to the |
| 7354 |
// "process.runtime.name" semantic conventions. It represents the name of the |
| 7355 |
// runtime of this process. |
| 7356 |
func ProcessRuntimeName(val string) attribute.KeyValue { |
| 7357 |
return ProcessRuntimeNameKey.String(val) |
| 7358 |
} |
| 7359 |
|
| 7360 |
// ProcessRuntimeVersion returns an attribute KeyValue conforming to the |
| 7361 |
// "process.runtime.version" semantic conventions. It represents the version of |
| 7362 |
// the runtime of this process, as returned by the runtime without |
| 7363 |
// modification. |
| 7364 |
func ProcessRuntimeVersion(val string) attribute.KeyValue { |
| 7365 |
return ProcessRuntimeVersionKey.String(val) |
| 7366 |
} |
| 7367 |
|
| 7368 |
// ProcessSavedUserID returns an attribute KeyValue conforming to the |
| 7369 |
// "process.saved_user.id" semantic conventions. It represents the saved user |
| 7370 |
// ID (SUID) of the process. |
| 7371 |
func ProcessSavedUserID(val int) attribute.KeyValue { |
| 7372 |
return ProcessSavedUserIDKey.Int(val) |
| 7373 |
} |
| 7374 |
|
| 7375 |
// ProcessSavedUserName returns an attribute KeyValue conforming to the |
| 7376 |
// "process.saved_user.name" semantic conventions. It represents the username |
| 7377 |
// of the saved user. |
| 7378 |
func ProcessSavedUserName(val string) attribute.KeyValue { |
| 7379 |
return ProcessSavedUserNameKey.String(val) |
| 7380 |
} |
| 7381 |
|
| 7382 |
// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the |
| 7383 |
// "process.session_leader.pid" semantic conventions. It represents the PID of |
| 7384 |
// the process's session leader. This is also the session ID (SID) of the |
| 7385 |
// process. |
| 7386 |
func ProcessSessionLeaderPID(val int) attribute.KeyValue { |
| 7387 |
return ProcessSessionLeaderPIDKey.Int(val) |
| 7388 |
} |
| 7389 |
|
| 7390 |
// ProcessUserID returns an attribute KeyValue conforming to the |
| 7391 |
// "process.user.id" semantic conventions. It represents the effective user ID |
| 7392 |
// (EUID) of the process. |
| 7393 |
func ProcessUserID(val int) attribute.KeyValue { |
| 7394 |
return ProcessUserIDKey.Int(val) |
| 7395 |
} |
| 7396 |
|
| 7397 |
// ProcessUserName returns an attribute KeyValue conforming to the |
| 7398 |
// "process.user.name" semantic conventions. It represents the username of the |
| 7399 |
// effective user of the process. |
| 7400 |
func ProcessUserName(val string) attribute.KeyValue { |
| 7401 |
return ProcessUserNameKey.String(val) |
| 7402 |
} |
| 7403 |
|
| 7404 |
// ProcessVpid returns an attribute KeyValue conforming to the |
| 7405 |
// "process.vpid" semantic conventions. It represents the virtual process |
| 7406 |
// identifier. |
| 7407 |
func ProcessVpid(val int) attribute.KeyValue { |
| 7408 |
return ProcessVpidKey.Int(val) |
| 7409 |
} |
| 7410 |
|
| 7411 |
// Attributes for remote procedure calls. |
| 7412 |
const ( |
| 7413 |
// RPCConnectRPCErrorCodeKey is the attribute Key conforming to the |
| 7414 |
// "rpc.connect_rpc.error_code" semantic conventions. It represents the |
| 7415 |
// [error codes](https://connect.build/docs/protocol/#error-codes) of the |
| 7416 |
// Connect request. Error codes are always string values. |
| 7417 |
// |
| 7418 |
// Type: Enum |
| 7419 |
// RequirementLevel: Optional |
| 7420 |
// Stability: experimental |
| 7421 |
RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") |
| 7422 |
|
| 7423 |
// RPCGRPCStatusCodeKey is the attribute Key conforming to the |
| 7424 |
// "rpc.grpc.status_code" semantic conventions. It represents the [numeric |
| 7425 |
// status |
| 7426 |
// code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of |
| 7427 |
// the gRPC request. |
| 7428 |
// |
| 7429 |
// Type: Enum |
| 7430 |
// RequirementLevel: Optional |
| 7431 |
// Stability: experimental |
| 7432 |
RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") |
| 7433 |
|
| 7434 |
// RPCJsonrpcErrorCodeKey is the attribute Key conforming to the |
| 7435 |
// "rpc.jsonrpc.error_code" semantic conventions. It represents the |
| 7436 |
// `error.code` property of response if it is an error response. |
| 7437 |
// |
| 7438 |
// Type: int |
| 7439 |
// RequirementLevel: Optional |
| 7440 |
// Stability: experimental |
| 7441 |
// Examples: -32700, 100 |
| 7442 |
RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") |
| 7443 |
|
| 7444 |
// RPCJsonrpcErrorMessageKey is the attribute Key conforming to the |
| 7445 |
// "rpc.jsonrpc.error_message" semantic conventions. It represents the |
| 7446 |
// `error.message` property of response if it is an error response. |
| 7447 |
// |
| 7448 |
// Type: string |
| 7449 |
// RequirementLevel: Optional |
| 7450 |
// Stability: experimental |
| 7451 |
// Examples: 'Parse error', 'User already exists' |
| 7452 |
RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") |
| 7453 |
|
| 7454 |
// RPCJsonrpcRequestIDKey is the attribute Key conforming to the |
| 7455 |
// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` |
| 7456 |
// property of request or response. Since protocol allows id to be int, |
| 7457 |
// string, `null` or missing (for notifications), value is expected to be |
| 7458 |
// cast to string for simplicity. Use empty string in case of `null` value. |
| 7459 |
// Omit entirely if this is a notification. |
| 7460 |
// |
| 7461 |
// Type: string |
| 7462 |
// RequirementLevel: Optional |
| 7463 |
// Stability: experimental |
| 7464 |
// Examples: '10', 'request-7', '' |
| 7465 |
RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") |
| 7466 |
|
| 7467 |
// RPCJsonrpcVersionKey is the attribute Key conforming to the |
| 7468 |
// "rpc.jsonrpc.version" semantic conventions. It represents the protocol |
| 7469 |
// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 |
| 7470 |
// doesn't specify this, the value can be omitted. |
| 7471 |
// |
| 7472 |
// Type: string |
| 7473 |
// RequirementLevel: Optional |
| 7474 |
// Stability: experimental |
| 7475 |
// Examples: '2.0', '1.0' |
| 7476 |
RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") |
| 7477 |
|
| 7478 |
// RPCMessageCompressedSizeKey is the attribute Key conforming to the |
| 7479 |
// "rpc.message.compressed_size" semantic conventions. It represents the |
| 7480 |
// compressed size of the message in bytes. |
| 7481 |
// |
| 7482 |
// Type: int |
| 7483 |
// RequirementLevel: Optional |
| 7484 |
// Stability: experimental |
| 7485 |
RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size") |
| 7486 |
|
| 7487 |
// RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id" |
| 7488 |
// semantic conventions. It represents the mUST be calculated as two |
| 7489 |
// different counters starting from `1` one for sent messages and one for |
| 7490 |
// received message. |
| 7491 |
// |
| 7492 |
// Type: int |
| 7493 |
// RequirementLevel: Optional |
| 7494 |
// Stability: experimental |
| 7495 |
// Note: This way we guarantee that the values will be consistent between |
| 7496 |
// different implementations. |
| 7497 |
RPCMessageIDKey = attribute.Key("rpc.message.id") |
| 7498 |
|
| 7499 |
// RPCMessageTypeKey is the attribute Key conforming to the |
| 7500 |
// "rpc.message.type" semantic conventions. It represents the whether this |
| 7501 |
// is a received or sent message. |
| 7502 |
// |
| 7503 |
// Type: Enum |
| 7504 |
// RequirementLevel: Optional |
| 7505 |
// Stability: experimental |
| 7506 |
RPCMessageTypeKey = attribute.Key("rpc.message.type") |
| 7507 |
|
| 7508 |
// RPCMessageUncompressedSizeKey is the attribute Key conforming to the |
| 7509 |
// "rpc.message.uncompressed_size" semantic conventions. It represents the |
| 7510 |
// uncompressed size of the message in bytes. |
| 7511 |
// |
| 7512 |
// Type: int |
| 7513 |
// RequirementLevel: Optional |
| 7514 |
// Stability: experimental |
| 7515 |
RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size") |
| 7516 |
|
| 7517 |
// RPCMethodKey is the attribute Key conforming to the "rpc.method" |
| 7518 |
// semantic conventions. It represents the name of the (logical) method |
| 7519 |
// being called, must be equal to the $method part in the span name. |
| 7520 |
// |
| 7521 |
// Type: string |
| 7522 |
// RequirementLevel: Optional |
| 7523 |
// Stability: experimental |
| 7524 |
// Examples: 'exampleMethod' |
| 7525 |
// Note: This is the logical name of the method from the RPC interface |
| 7526 |
// perspective, which can be different from the name of any implementing |
| 7527 |
// method/function. The `code.function` attribute may be used to store the |
| 7528 |
// latter (e.g., method actually executing the call on the server side, RPC |
| 7529 |
// client stub method on the client side). |
| 7530 |
RPCMethodKey = attribute.Key("rpc.method") |
| 7531 |
|
| 7532 |
// RPCServiceKey is the attribute Key conforming to the "rpc.service" |
| 7533 |
// semantic conventions. It represents the full (logical) name of the |
| 7534 |
// service being called, including its package name, if applicable. |
| 7535 |
// |
| 7536 |
// Type: string |
| 7537 |
// RequirementLevel: Optional |
| 7538 |
// Stability: experimental |
| 7539 |
// Examples: 'myservice.EchoService' |
| 7540 |
// Note: This is the logical name of the service from the RPC interface |
| 7541 |
// perspective, which can be different from the name of any implementing |
| 7542 |
// class. The `code.namespace` attribute may be used to store the latter |
| 7543 |
// (despite the attribute name, it may include a class name; e.g., class |
| 7544 |
// with method actually executing the call on the server side, RPC client |
| 7545 |
// stub class on the client side). |
| 7546 |
RPCServiceKey = attribute.Key("rpc.service") |
| 7547 |
|
| 7548 |
// RPCSystemKey is the attribute Key conforming to the "rpc.system" |
| 7549 |
// semantic conventions. It represents a string identifying the remoting |
| 7550 |
// system. See below for a list of well-known identifiers. |
| 7551 |
// |
| 7552 |
// Type: Enum |
| 7553 |
// RequirementLevel: Optional |
| 7554 |
// Stability: experimental |
| 7555 |
RPCSystemKey = attribute.Key("rpc.system") |
| 7556 |
) |
| 7557 |
|
| 7558 |
var ( |
| 7559 |
// cancelled |
| 7560 |
RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") |
| 7561 |
// unknown |
| 7562 |
RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") |
| 7563 |
// invalid_argument |
| 7564 |
RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") |
| 7565 |
// deadline_exceeded |
| 7566 |
RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") |
| 7567 |
// not_found |
| 7568 |
RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") |
| 7569 |
// already_exists |
| 7570 |
RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") |
| 7571 |
// permission_denied |
| 7572 |
RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") |
| 7573 |
// resource_exhausted |
| 7574 |
RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") |
| 7575 |
// failed_precondition |
| 7576 |
RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") |
| 7577 |
// aborted |
| 7578 |
RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") |
| 7579 |
// out_of_range |
| 7580 |
RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") |
| 7581 |
// unimplemented |
| 7582 |
RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") |
| 7583 |
// internal |
| 7584 |
RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") |
| 7585 |
// unavailable |
| 7586 |
RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") |
| 7587 |
// data_loss |
| 7588 |
RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") |
| 7589 |
// unauthenticated |
| 7590 |
RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") |
| 7591 |
) |
| 7592 |
|
| 7593 |
var ( |
| 7594 |
// OK |
| 7595 |
RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) |
| 7596 |
// CANCELLED |
| 7597 |
RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) |
| 7598 |
// UNKNOWN |
| 7599 |
RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) |
| 7600 |
// INVALID_ARGUMENT |
| 7601 |
RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) |
| 7602 |
// DEADLINE_EXCEEDED |
| 7603 |
RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) |
| 7604 |
// NOT_FOUND |
| 7605 |
RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) |
| 7606 |
// ALREADY_EXISTS |
| 7607 |
RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) |
| 7608 |
// PERMISSION_DENIED |
| 7609 |
RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) |
| 7610 |
// RESOURCE_EXHAUSTED |
| 7611 |
RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) |
| 7612 |
// FAILED_PRECONDITION |
| 7613 |
RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) |
| 7614 |
// ABORTED |
| 7615 |
RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) |
| 7616 |
// OUT_OF_RANGE |
| 7617 |
RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) |
| 7618 |
// UNIMPLEMENTED |
| 7619 |
RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) |
| 7620 |
// INTERNAL |
| 7621 |
RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) |
| 7622 |
// UNAVAILABLE |
| 7623 |
RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) |
| 7624 |
// DATA_LOSS |
| 7625 |
RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) |
| 7626 |
// UNAUTHENTICATED |
| 7627 |
RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) |
| 7628 |
) |
| 7629 |
|
| 7630 |
var ( |
| 7631 |
// sent |
| 7632 |
RPCMessageTypeSent = RPCMessageTypeKey.String("SENT") |
| 7633 |
// received |
| 7634 |
RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED") |
| 7635 |
) |
| 7636 |
|
| 7637 |
var ( |
| 7638 |
// gRPC |
| 7639 |
RPCSystemGRPC = RPCSystemKey.String("grpc") |
| 7640 |
// Java RMI |
| 7641 |
RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") |
| 7642 |
// .NET WCF |
| 7643 |
RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") |
| 7644 |
// Apache Dubbo |
| 7645 |
RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") |
| 7646 |
// Connect RPC |
| 7647 |
RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") |
| 7648 |
) |
| 7649 |
|
| 7650 |
// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the |
| 7651 |
// "rpc.jsonrpc.error_code" semantic conventions. It represents the |
| 7652 |
// `error.code` property of response if it is an error response. |
| 7653 |
func RPCJsonrpcErrorCode(val int) attribute.KeyValue { |
| 7654 |
return RPCJsonrpcErrorCodeKey.Int(val) |
| 7655 |
} |
| 7656 |
|
| 7657 |
// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the |
| 7658 |
// "rpc.jsonrpc.error_message" semantic conventions. It represents the |
| 7659 |
// `error.message` property of response if it is an error response. |
| 7660 |
func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { |
| 7661 |
return RPCJsonrpcErrorMessageKey.String(val) |
| 7662 |
} |
| 7663 |
|
| 7664 |
// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the |
| 7665 |
// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` |
| 7666 |
// property of request or response. Since protocol allows id to be int, string, |
| 7667 |
// `null` or missing (for notifications), value is expected to be cast to |
| 7668 |
// string for simplicity. Use empty string in case of `null` value. Omit |
| 7669 |
// entirely if this is a notification. |
| 7670 |
func RPCJsonrpcRequestID(val string) attribute.KeyValue { |
| 7671 |
return RPCJsonrpcRequestIDKey.String(val) |
| 7672 |
} |
| 7673 |
|
| 7674 |
// RPCJsonrpcVersion returns an attribute KeyValue conforming to the |
| 7675 |
// "rpc.jsonrpc.version" semantic conventions. It represents the protocol |
| 7676 |
// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 |
| 7677 |
// doesn't specify this, the value can be omitted. |
| 7678 |
func RPCJsonrpcVersion(val string) attribute.KeyValue { |
| 7679 |
return RPCJsonrpcVersionKey.String(val) |
| 7680 |
} |
| 7681 |
|
| 7682 |
// RPCMessageCompressedSize returns an attribute KeyValue conforming to the |
| 7683 |
// "rpc.message.compressed_size" semantic conventions. It represents the |
| 7684 |
// compressed size of the message in bytes. |
| 7685 |
func RPCMessageCompressedSize(val int) attribute.KeyValue { |
| 7686 |
return RPCMessageCompressedSizeKey.Int(val) |
| 7687 |
} |
| 7688 |
|
| 7689 |
// RPCMessageID returns an attribute KeyValue conforming to the |
| 7690 |
// "rpc.message.id" semantic conventions. It represents the mUST be calculated |
| 7691 |
// as two different counters starting from `1` one for sent messages and one |
| 7692 |
// for received message. |
| 7693 |
func RPCMessageID(val int) attribute.KeyValue { |
| 7694 |
return RPCMessageIDKey.Int(val) |
| 7695 |
} |
| 7696 |
|
| 7697 |
// RPCMessageUncompressedSize returns an attribute KeyValue conforming to |
| 7698 |
// the "rpc.message.uncompressed_size" semantic conventions. It represents the |
| 7699 |
// uncompressed size of the message in bytes. |
| 7700 |
func RPCMessageUncompressedSize(val int) attribute.KeyValue { |
| 7701 |
return RPCMessageUncompressedSizeKey.Int(val) |
| 7702 |
} |
| 7703 |
|
| 7704 |
// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" |
| 7705 |
// semantic conventions. It represents the name of the (logical) method being |
| 7706 |
// called, must be equal to the $method part in the span name. |
| 7707 |
func RPCMethod(val string) attribute.KeyValue { |
| 7708 |
return RPCMethodKey.String(val) |
| 7709 |
} |
| 7710 |
|
| 7711 |
// RPCService returns an attribute KeyValue conforming to the "rpc.service" |
| 7712 |
// semantic conventions. It represents the full (logical) name of the service |
| 7713 |
// being called, including its package name, if applicable. |
| 7714 |
func RPCService(val string) attribute.KeyValue { |
| 7715 |
return RPCServiceKey.String(val) |
| 7716 |
} |
| 7717 |
|
| 7718 |
// These attributes may be used to describe the server in a connection-based |
| 7719 |
// network interaction where there is one side that initiates the connection |
| 7720 |
// (the client is the side that initiates the connection). This covers all TCP |
| 7721 |
// network interactions since TCP is connection-based and one side initiates |
| 7722 |
// the connection (an exception is made for peer-to-peer communication over TCP |
| 7723 |
// where the "user-facing" surface of the protocol / API doesn't expose a clear |
| 7724 |
// notion of client and server). This also covers UDP network interactions |
| 7725 |
// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. |
| 7726 |
const ( |
| 7727 |
// ServerAddressKey is the attribute Key conforming to the "server.address" |
| 7728 |
// semantic conventions. It represents the server domain name if available |
| 7729 |
// without reverse DNS lookup; otherwise, IP address or Unix domain socket |
| 7730 |
// name. |
| 7731 |
// |
| 7732 |
// Type: string |
| 7733 |
// RequirementLevel: Optional |
| 7734 |
// Stability: stable |
| 7735 |
// Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' |
| 7736 |
// Note: When observed from the client side, and when communicating through |
| 7737 |
// an intermediary, `server.address` SHOULD represent the server address |
| 7738 |
// behind any intermediaries, for example proxies, if it's available. |
| 7739 |
ServerAddressKey = attribute.Key("server.address") |
| 7740 |
|
| 7741 |
// ServerPortKey is the attribute Key conforming to the "server.port" |
| 7742 |
// semantic conventions. It represents the server port number. |
| 7743 |
// |
| 7744 |
// Type: int |
| 7745 |
// RequirementLevel: Optional |
| 7746 |
// Stability: stable |
| 7747 |
// Examples: 80, 8080, 443 |
| 7748 |
// Note: When observed from the client side, and when communicating through |
| 7749 |
// an intermediary, `server.port` SHOULD represent the server port behind |
| 7750 |
// any intermediaries, for example proxies, if it's available. |
| 7751 |
ServerPortKey = attribute.Key("server.port") |
| 7752 |
) |
| 7753 |
|
| 7754 |
// ServerAddress returns an attribute KeyValue conforming to the |
| 7755 |
// "server.address" semantic conventions. It represents the server domain name |
| 7756 |
// if available without reverse DNS lookup; otherwise, IP address or Unix |
| 7757 |
// domain socket name. |
| 7758 |
func ServerAddress(val string) attribute.KeyValue { |
| 7759 |
return ServerAddressKey.String(val) |
| 7760 |
} |
| 7761 |
|
| 7762 |
// ServerPort returns an attribute KeyValue conforming to the "server.port" |
| 7763 |
// semantic conventions. It represents the server port number. |
| 7764 |
func ServerPort(val int) attribute.KeyValue { |
| 7765 |
return ServerPortKey.Int(val) |
| 7766 |
} |
| 7767 |
|
| 7768 |
// A service instance. |
| 7769 |
const ( |
| 7770 |
// ServiceInstanceIDKey is the attribute Key conforming to the |
| 7771 |
// "service.instance.id" semantic conventions. It represents the string ID |
| 7772 |
// of the service instance. |
| 7773 |
// |
| 7774 |
// Type: string |
| 7775 |
// RequirementLevel: Optional |
| 7776 |
// Stability: experimental |
| 7777 |
// Examples: '627cc493-f310-47de-96bd-71410b7dec09' |
| 7778 |
// Note: MUST be unique for each instance of the same |
| 7779 |
// `service.namespace,service.name` pair (in other words |
| 7780 |
// `service.namespace,service.name,service.instance.id` triplet MUST be |
| 7781 |
// globally unique). The ID helps to |
| 7782 |
// distinguish instances of the same service that exist at the same time |
| 7783 |
// (e.g. instances of a horizontally scaled |
| 7784 |
// service). |
| 7785 |
// |
| 7786 |
// Implementations, such as SDKs, are recommended to generate a random |
| 7787 |
// Version 1 or Version 4 [RFC |
| 7788 |
// 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an |
| 7789 |
// inherent unique ID as the source of |
| 7790 |
// this value if stability is desirable. In that case, the ID SHOULD be |
| 7791 |
// used as source of a UUID Version 5 and |
| 7792 |
// SHOULD use the following UUID as the namespace: |
| 7793 |
// `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. |
| 7794 |
// |
| 7795 |
// UUIDs are typically recommended, as only an opaque value for the |
| 7796 |
// purposes of identifying a service instance is |
| 7797 |
// needed. Similar to what can be seen in the man page for the |
| 7798 |
// [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) |
| 7799 |
// file, the underlying |
| 7800 |
// data, such as pod name and namespace should be treated as confidential, |
| 7801 |
// being the user's choice to expose it |
| 7802 |
// or not via another resource attribute. |
| 7803 |
// |
| 7804 |
// For applications running behind an application server (like unicorn), we |
| 7805 |
// do not recommend using one identifier |
| 7806 |
// for all processes participating in the application. Instead, it's |
| 7807 |
// recommended each division (e.g. a worker |
| 7808 |
// thread in unicorn) to have its own instance.id. |
| 7809 |
// |
| 7810 |
// It's not recommended for a Collector to set `service.instance.id` if it |
| 7811 |
// can't unambiguously determine the |
| 7812 |
// service instance that is generating that telemetry. For instance, |
| 7813 |
// creating an UUID based on `pod.name` will |
| 7814 |
// likely be wrong, as the Collector might not know from which container |
| 7815 |
// within that pod the telemetry originated. |
| 7816 |
// However, Collectors can set the `service.instance.id` if they can |
| 7817 |
// unambiguously determine the service instance |
| 7818 |
// for that telemetry. This is typically the case for scraping receivers, |
| 7819 |
// as they know the target address and |
| 7820 |
// port. |
| 7821 |
ServiceInstanceIDKey = attribute.Key("service.instance.id") |
| 7822 |
|
| 7823 |
// ServiceNameKey is the attribute Key conforming to the "service.name" |
| 7824 |
// semantic conventions. It represents the logical name of the service. |
| 7825 |
// |
| 7826 |
// Type: string |
| 7827 |
// RequirementLevel: Optional |
| 7828 |
// Stability: stable |
| 7829 |
// Examples: 'shoppingcart' |
| 7830 |
// Note: MUST be the same for all instances of horizontally scaled |
| 7831 |
// services. If the value was not specified, SDKs MUST fallback to |
| 7832 |
// `unknown_service:` concatenated with |
| 7833 |
// [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If |
| 7834 |
// `process.executable.name` is not available, the value MUST be set to |
| 7835 |
// `unknown_service`. |
| 7836 |
ServiceNameKey = attribute.Key("service.name") |
| 7837 |
|
| 7838 |
// ServiceNamespaceKey is the attribute Key conforming to the |
| 7839 |
// "service.namespace" semantic conventions. It represents a namespace for |
| 7840 |
// `service.name`. |
| 7841 |
// |
| 7842 |
// Type: string |
| 7843 |
// RequirementLevel: Optional |
| 7844 |
// Stability: experimental |
| 7845 |
// Examples: 'Shop' |
| 7846 |
// Note: A string value having a meaning that helps to distinguish a group |
| 7847 |
// of services, for example the team name that owns a group of services. |
| 7848 |
// `service.name` is expected to be unique within the same namespace. If |
| 7849 |
// `service.namespace` is not specified in the Resource then `service.name` |
| 7850 |
// is expected to be unique for all services that have no explicit |
| 7851 |
// namespace defined (so the empty/unspecified namespace is simply one more |
| 7852 |
// valid namespace). Zero-length namespace string is assumed equal to |
| 7853 |
// unspecified namespace. |
| 7854 |
ServiceNamespaceKey = attribute.Key("service.namespace") |
| 7855 |
|
| 7856 |
// ServiceVersionKey is the attribute Key conforming to the |
| 7857 |
// "service.version" semantic conventions. It represents the version string |
| 7858 |
// of the service API or implementation. The format is not defined by these |
| 7859 |
// conventions. |
| 7860 |
// |
| 7861 |
// Type: string |
| 7862 |
// RequirementLevel: Optional |
| 7863 |
// Stability: stable |
| 7864 |
// Examples: '2.0.0', 'a01dbef8a' |
| 7865 |
ServiceVersionKey = attribute.Key("service.version") |
| 7866 |
) |
| 7867 |
|
| 7868 |
// ServiceInstanceID returns an attribute KeyValue conforming to the |
| 7869 |
// "service.instance.id" semantic conventions. It represents the string ID of |
| 7870 |
// the service instance. |
| 7871 |
func ServiceInstanceID(val string) attribute.KeyValue { |
| 7872 |
return ServiceInstanceIDKey.String(val) |
| 7873 |
} |
| 7874 |
|
| 7875 |
// ServiceName returns an attribute KeyValue conforming to the |
| 7876 |
// "service.name" semantic conventions. It represents the logical name of the |
| 7877 |
// service. |
| 7878 |
func ServiceName(val string) attribute.KeyValue { |
| 7879 |
return ServiceNameKey.String(val) |
| 7880 |
} |
| 7881 |
|
| 7882 |
// ServiceNamespace returns an attribute KeyValue conforming to the |
| 7883 |
// "service.namespace" semantic conventions. It represents a namespace for |
| 7884 |
// `service.name`. |
| 7885 |
func ServiceNamespace(val string) attribute.KeyValue { |
| 7886 |
return ServiceNamespaceKey.String(val) |
| 7887 |
} |
| 7888 |
|
| 7889 |
// ServiceVersion returns an attribute KeyValue conforming to the |
| 7890 |
// "service.version" semantic conventions. It represents the version string of |
| 7891 |
// the service API or implementation. The format is not defined by these |
| 7892 |
// conventions. |
| 7893 |
func ServiceVersion(val string) attribute.KeyValue { |
| 7894 |
return ServiceVersionKey.String(val) |
| 7895 |
} |
| 7896 |
|
| 7897 |
// Session is defined as the period of time encompassing all activities |
| 7898 |
// performed by the application and the actions executed by the end user. |
| 7899 |
// Consequently, a Session is represented as a collection of Logs, Events, and |
| 7900 |
// Spans emitted by the Client Application throughout the Session's duration. |
| 7901 |
// Each Session is assigned a unique identifier, which is included as an |
| 7902 |
// attribute in the Logs, Events, and Spans generated during the Session's |
| 7903 |
// lifecycle. |
| 7904 |
// When a session reaches end of life, typically due to user inactivity or |
| 7905 |
// session timeout, a new session identifier will be assigned. The previous |
| 7906 |
// session identifier may be provided by the instrumentation so that telemetry |
| 7907 |
// backends can link the two sessions. |
| 7908 |
const ( |
| 7909 |
// SessionIDKey is the attribute Key conforming to the "session.id" |
| 7910 |
// semantic conventions. It represents a unique id to identify a session. |
| 7911 |
// |
| 7912 |
// Type: string |
| 7913 |
// RequirementLevel: Optional |
| 7914 |
// Stability: experimental |
| 7915 |
// Examples: '00112233-4455-6677-8899-aabbccddeeff' |
| 7916 |
SessionIDKey = attribute.Key("session.id") |
| 7917 |
|
| 7918 |
// SessionPreviousIDKey is the attribute Key conforming to the |
| 7919 |
// "session.previous_id" semantic conventions. It represents the previous |
| 7920 |
// `session.id` for this user, when known. |
| 7921 |
// |
| 7922 |
// Type: string |
| 7923 |
// RequirementLevel: Optional |
| 7924 |
// Stability: experimental |
| 7925 |
// Examples: '00112233-4455-6677-8899-aabbccddeeff' |
| 7926 |
SessionPreviousIDKey = attribute.Key("session.previous_id") |
| 7927 |
) |
| 7928 |
|
| 7929 |
// SessionID returns an attribute KeyValue conforming to the "session.id" |
| 7930 |
// semantic conventions. It represents a unique id to identify a session. |
| 7931 |
func SessionID(val string) attribute.KeyValue { |
| 7932 |
return SessionIDKey.String(val) |
| 7933 |
} |
| 7934 |
|
| 7935 |
// SessionPreviousID returns an attribute KeyValue conforming to the |
| 7936 |
// "session.previous_id" semantic conventions. It represents the previous |
| 7937 |
// `session.id` for this user, when known. |
| 7938 |
func SessionPreviousID(val string) attribute.KeyValue { |
| 7939 |
return SessionPreviousIDKey.String(val) |
| 7940 |
} |
| 7941 |
|
| 7942 |
// SignalR attributes |
| 7943 |
const ( |
| 7944 |
// SignalrConnectionStatusKey is the attribute Key conforming to the |
| 7945 |
// "signalr.connection.status" semantic conventions. It represents the |
| 7946 |
// signalR HTTP connection closure status. |
| 7947 |
// |
| 7948 |
// Type: Enum |
| 7949 |
// RequirementLevel: Optional |
| 7950 |
// Stability: stable |
| 7951 |
// Examples: 'app_shutdown', 'timeout' |
| 7952 |
SignalrConnectionStatusKey = attribute.Key("signalr.connection.status") |
| 7953 |
|
| 7954 |
// SignalrTransportKey is the attribute Key conforming to the |
| 7955 |
// "signalr.transport" semantic conventions. It represents the [SignalR |
| 7956 |
// transport |
| 7957 |
// type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) |
| 7958 |
// |
| 7959 |
// Type: Enum |
| 7960 |
// RequirementLevel: Optional |
| 7961 |
// Stability: stable |
| 7962 |
// Examples: 'web_sockets', 'long_polling' |
| 7963 |
SignalrTransportKey = attribute.Key("signalr.transport") |
| 7964 |
) |
| 7965 |
|
| 7966 |
var ( |
| 7967 |
// The connection was closed normally |
| 7968 |
SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure") |
| 7969 |
// The connection was closed due to a timeout |
| 7970 |
SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout") |
| 7971 |
// The connection was closed because the app is shutting down |
| 7972 |
SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown") |
| 7973 |
) |
| 7974 |
|
| 7975 |
var ( |
| 7976 |
// ServerSentEvents protocol |
| 7977 |
SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events") |
| 7978 |
// LongPolling protocol |
| 7979 |
SignalrTransportLongPolling = SignalrTransportKey.String("long_polling") |
| 7980 |
// WebSockets protocol |
| 7981 |
SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets") |
| 7982 |
) |
| 7983 |
|
| 7984 |
// These attributes may be used to describe the sender of a network |
| 7985 |
// exchange/packet. These should be used when there is no client/server |
| 7986 |
// relationship between the two sides, or when that relationship is unknown. |
| 7987 |
// This covers low-level network interactions (e.g. packet tracing) where you |
| 7988 |
// don't know if there was a connection or which side initiated it. This also |
| 7989 |
// covers unidirectional UDP flows and peer-to-peer communication where the |
| 7990 |
// "user-facing" surface of the protocol / API doesn't expose a clear notion of |
| 7991 |
// client and server. |
| 7992 |
const ( |
| 7993 |
// SourceAddressKey is the attribute Key conforming to the "source.address" |
| 7994 |
// semantic conventions. It represents the source address - domain name if |
| 7995 |
// available without reverse DNS lookup; otherwise, IP address or Unix |
| 7996 |
// domain socket name. |
| 7997 |
// |
| 7998 |
// Type: string |
| 7999 |
// RequirementLevel: Optional |
| 8000 |
// Stability: experimental |
| 8001 |
// Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' |
| 8002 |
// Note: When observed from the destination side, and when communicating |
| 8003 |
// through an intermediary, `source.address` SHOULD represent the source |
| 8004 |
// address behind any intermediaries, for example proxies, if it's |
| 8005 |
// available. |
| 8006 |
SourceAddressKey = attribute.Key("source.address") |
| 8007 |
|
| 8008 |
// SourcePortKey is the attribute Key conforming to the "source.port" |
| 8009 |
// semantic conventions. It represents the source port number |
| 8010 |
// |
| 8011 |
// Type: int |
| 8012 |
// RequirementLevel: Optional |
| 8013 |
// Stability: experimental |
| 8014 |
// Examples: 3389, 2888 |
| 8015 |
SourcePortKey = attribute.Key("source.port") |
| 8016 |
) |
| 8017 |
|
| 8018 |
// SourceAddress returns an attribute KeyValue conforming to the |
| 8019 |
// "source.address" semantic conventions. It represents the source address - |
| 8020 |
// domain name if available without reverse DNS lookup; otherwise, IP address |
| 8021 |
// or Unix domain socket name. |
| 8022 |
func SourceAddress(val string) attribute.KeyValue { |
| 8023 |
return SourceAddressKey.String(val) |
| 8024 |
} |
| 8025 |
|
| 8026 |
// SourcePort returns an attribute KeyValue conforming to the "source.port" |
| 8027 |
// semantic conventions. It represents the source port number |
| 8028 |
func SourcePort(val int) attribute.KeyValue { |
| 8029 |
return SourcePortKey.Int(val) |
| 8030 |
} |
| 8031 |
|
| 8032 |
// Describes System attributes |
| 8033 |
const ( |
| 8034 |
// SystemDeviceKey is the attribute Key conforming to the "system.device" |
| 8035 |
// semantic conventions. It represents the device identifier |
| 8036 |
// |
| 8037 |
// Type: string |
| 8038 |
// RequirementLevel: Optional |
| 8039 |
// Stability: experimental |
| 8040 |
// Examples: '(identifier)' |
| 8041 |
SystemDeviceKey = attribute.Key("system.device") |
| 8042 |
) |
| 8043 |
|
| 8044 |
// SystemDevice returns an attribute KeyValue conforming to the |
| 8045 |
// "system.device" semantic conventions. It represents the device identifier |
| 8046 |
func SystemDevice(val string) attribute.KeyValue { |
| 8047 |
return SystemDeviceKey.String(val) |
| 8048 |
} |
| 8049 |
|
| 8050 |
// Describes System CPU attributes |
| 8051 |
const ( |
| 8052 |
// SystemCPULogicalNumberKey is the attribute Key conforming to the |
| 8053 |
// "system.cpu.logical_number" semantic conventions. It represents the |
| 8054 |
// logical CPU number [0..n-1] |
| 8055 |
// |
| 8056 |
// Type: int |
| 8057 |
// RequirementLevel: Optional |
| 8058 |
// Stability: experimental |
| 8059 |
// Examples: 1 |
| 8060 |
SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number") |
| 8061 |
) |
| 8062 |
|
| 8063 |
// SystemCPULogicalNumber returns an attribute KeyValue conforming to the |
| 8064 |
// "system.cpu.logical_number" semantic conventions. It represents the logical |
| 8065 |
// CPU number [0..n-1] |
| 8066 |
func SystemCPULogicalNumber(val int) attribute.KeyValue { |
| 8067 |
return SystemCPULogicalNumberKey.Int(val) |
| 8068 |
} |
| 8069 |
|
| 8070 |
// Describes System Memory attributes |
| 8071 |
const ( |
| 8072 |
// SystemMemoryStateKey is the attribute Key conforming to the |
| 8073 |
// "system.memory.state" semantic conventions. It represents the memory |
| 8074 |
// state |
| 8075 |
// |
| 8076 |
// Type: Enum |
| 8077 |
// RequirementLevel: Optional |
| 8078 |
// Stability: experimental |
| 8079 |
// Examples: 'free', 'cached' |
| 8080 |
SystemMemoryStateKey = attribute.Key("system.memory.state") |
| 8081 |
) |
| 8082 |
|
| 8083 |
var ( |
| 8084 |
// used |
| 8085 |
SystemMemoryStateUsed = SystemMemoryStateKey.String("used") |
| 8086 |
// free |
| 8087 |
SystemMemoryStateFree = SystemMemoryStateKey.String("free") |
| 8088 |
// shared |
| 8089 |
SystemMemoryStateShared = SystemMemoryStateKey.String("shared") |
| 8090 |
// buffers |
| 8091 |
SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") |
| 8092 |
// cached |
| 8093 |
SystemMemoryStateCached = SystemMemoryStateKey.String("cached") |
| 8094 |
) |
| 8095 |
|
| 8096 |
// Describes System Memory Paging attributes |
| 8097 |
const ( |
| 8098 |
// SystemPagingDirectionKey is the attribute Key conforming to the |
| 8099 |
// "system.paging.direction" semantic conventions. It represents the paging |
| 8100 |
// access direction |
| 8101 |
// |
| 8102 |
// Type: Enum |
| 8103 |
// RequirementLevel: Optional |
| 8104 |
// Stability: experimental |
| 8105 |
// Examples: 'in' |
| 8106 |
SystemPagingDirectionKey = attribute.Key("system.paging.direction") |
| 8107 |
|
| 8108 |
// SystemPagingStateKey is the attribute Key conforming to the |
| 8109 |
// "system.paging.state" semantic conventions. It represents the memory |
| 8110 |
// paging state |
| 8111 |
// |
| 8112 |
// Type: Enum |
| 8113 |
// RequirementLevel: Optional |
| 8114 |
// Stability: experimental |
| 8115 |
// Examples: 'free' |
| 8116 |
SystemPagingStateKey = attribute.Key("system.paging.state") |
| 8117 |
|
| 8118 |
// SystemPagingTypeKey is the attribute Key conforming to the |
| 8119 |
// "system.paging.type" semantic conventions. It represents the memory |
| 8120 |
// paging type |
| 8121 |
// |
| 8122 |
// Type: Enum |
| 8123 |
// RequirementLevel: Optional |
| 8124 |
// Stability: experimental |
| 8125 |
// Examples: 'minor' |
| 8126 |
SystemPagingTypeKey = attribute.Key("system.paging.type") |
| 8127 |
) |
| 8128 |
|
| 8129 |
var ( |
| 8130 |
// in |
| 8131 |
SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") |
| 8132 |
// out |
| 8133 |
SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") |
| 8134 |
) |
| 8135 |
|
| 8136 |
var ( |
| 8137 |
// used |
| 8138 |
SystemPagingStateUsed = SystemPagingStateKey.String("used") |
| 8139 |
// free |
| 8140 |
SystemPagingStateFree = SystemPagingStateKey.String("free") |
| 8141 |
) |
| 8142 |
|
| 8143 |
var ( |
| 8144 |
// major |
| 8145 |
SystemPagingTypeMajor = SystemPagingTypeKey.String("major") |
| 8146 |
// minor |
| 8147 |
SystemPagingTypeMinor = SystemPagingTypeKey.String("minor") |
| 8148 |
) |
| 8149 |
|
| 8150 |
// Describes Filesystem attributes |
| 8151 |
const ( |
| 8152 |
// SystemFilesystemModeKey is the attribute Key conforming to the |
| 8153 |
// "system.filesystem.mode" semantic conventions. It represents the |
| 8154 |
// filesystem mode |
| 8155 |
// |
| 8156 |
// Type: string |
| 8157 |
// RequirementLevel: Optional |
| 8158 |
// Stability: experimental |
| 8159 |
// Examples: 'rw, ro' |
| 8160 |
SystemFilesystemModeKey = attribute.Key("system.filesystem.mode") |
| 8161 |
|
| 8162 |
// SystemFilesystemMountpointKey is the attribute Key conforming to the |
| 8163 |
// "system.filesystem.mountpoint" semantic conventions. It represents the |
| 8164 |
// filesystem mount path |
| 8165 |
// |
| 8166 |
// Type: string |
| 8167 |
// RequirementLevel: Optional |
| 8168 |
// Stability: experimental |
| 8169 |
// Examples: '/mnt/data' |
| 8170 |
SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint") |
| 8171 |
|
| 8172 |
// SystemFilesystemStateKey is the attribute Key conforming to the |
| 8173 |
// "system.filesystem.state" semantic conventions. It represents the |
| 8174 |
// filesystem state |
| 8175 |
// |
| 8176 |
// Type: Enum |
| 8177 |
// RequirementLevel: Optional |
| 8178 |
// Stability: experimental |
| 8179 |
// Examples: 'used' |
| 8180 |
SystemFilesystemStateKey = attribute.Key("system.filesystem.state") |
| 8181 |
|
| 8182 |
// SystemFilesystemTypeKey is the attribute Key conforming to the |
| 8183 |
// "system.filesystem.type" semantic conventions. It represents the |
| 8184 |
// filesystem type |
| 8185 |
// |
| 8186 |
// Type: Enum |
| 8187 |
// RequirementLevel: Optional |
| 8188 |
// Stability: experimental |
| 8189 |
// Examples: 'ext4' |
| 8190 |
SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") |
| 8191 |
) |
| 8192 |
|
| 8193 |
var ( |
| 8194 |
// used |
| 8195 |
SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") |
| 8196 |
// free |
| 8197 |
SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") |
| 8198 |
// reserved |
| 8199 |
SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") |
| 8200 |
) |
| 8201 |
|
| 8202 |
var ( |
| 8203 |
// fat32 |
| 8204 |
SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") |
| 8205 |
// exfat |
| 8206 |
SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") |
| 8207 |
// ntfs |
| 8208 |
SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") |
| 8209 |
// refs |
| 8210 |
SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") |
| 8211 |
// hfsplus |
| 8212 |
SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") |
| 8213 |
// ext4 |
| 8214 |
SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") |
| 8215 |
) |
| 8216 |
|
| 8217 |
// SystemFilesystemMode returns an attribute KeyValue conforming to the |
| 8218 |
// "system.filesystem.mode" semantic conventions. It represents the filesystem |
| 8219 |
// mode |
| 8220 |
func SystemFilesystemMode(val string) attribute.KeyValue { |
| 8221 |
return SystemFilesystemModeKey.String(val) |
| 8222 |
} |
| 8223 |
|
| 8224 |
// SystemFilesystemMountpoint returns an attribute KeyValue conforming to |
| 8225 |
// the "system.filesystem.mountpoint" semantic conventions. It represents the |
| 8226 |
// filesystem mount path |
| 8227 |
func SystemFilesystemMountpoint(val string) attribute.KeyValue { |
| 8228 |
return SystemFilesystemMountpointKey.String(val) |
| 8229 |
} |
| 8230 |
|
| 8231 |
// Describes Network attributes |
| 8232 |
const ( |
| 8233 |
// SystemNetworkStateKey is the attribute Key conforming to the |
| 8234 |
// "system.network.state" semantic conventions. It represents a stateless |
| 8235 |
// protocol MUST NOT set this attribute |
| 8236 |
// |
| 8237 |
// Type: Enum |
| 8238 |
// RequirementLevel: Optional |
| 8239 |
// Stability: experimental |
| 8240 |
// Examples: 'close_wait' |
| 8241 |
SystemNetworkStateKey = attribute.Key("system.network.state") |
| 8242 |
) |
| 8243 |
|
| 8244 |
var ( |
| 8245 |
// close |
| 8246 |
SystemNetworkStateClose = SystemNetworkStateKey.String("close") |
| 8247 |
// close_wait |
| 8248 |
SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait") |
| 8249 |
// closing |
| 8250 |
SystemNetworkStateClosing = SystemNetworkStateKey.String("closing") |
| 8251 |
// delete |
| 8252 |
SystemNetworkStateDelete = SystemNetworkStateKey.String("delete") |
| 8253 |
// established |
| 8254 |
SystemNetworkStateEstablished = SystemNetworkStateKey.String("established") |
| 8255 |
// fin_wait_1 |
| 8256 |
SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1") |
| 8257 |
// fin_wait_2 |
| 8258 |
SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2") |
| 8259 |
// last_ack |
| 8260 |
SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack") |
| 8261 |
// listen |
| 8262 |
SystemNetworkStateListen = SystemNetworkStateKey.String("listen") |
| 8263 |
// syn_recv |
| 8264 |
SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv") |
| 8265 |
// syn_sent |
| 8266 |
SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent") |
| 8267 |
// time_wait |
| 8268 |
SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait") |
| 8269 |
) |
| 8270 |
|
| 8271 |
// Describes System Process attributes |
| 8272 |
const ( |
| 8273 |
// SystemProcessStatusKey is the attribute Key conforming to the |
| 8274 |
// "system.process.status" semantic conventions. It represents the process |
| 8275 |
// state, e.g., [Linux Process State |
| 8276 |
// Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) |
| 8277 |
// |
| 8278 |
// Type: Enum |
| 8279 |
// RequirementLevel: Optional |
| 8280 |
// Stability: experimental |
| 8281 |
// Examples: 'running' |
| 8282 |
SystemProcessStatusKey = attribute.Key("system.process.status") |
| 8283 |
) |
| 8284 |
|
| 8285 |
var ( |
| 8286 |
// running |
| 8287 |
SystemProcessStatusRunning = SystemProcessStatusKey.String("running") |
| 8288 |
// sleeping |
| 8289 |
SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping") |
| 8290 |
// stopped |
| 8291 |
SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped") |
| 8292 |
// defunct |
| 8293 |
SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct") |
| 8294 |
) |
| 8295 |
|
| 8296 |
// Attributes for telemetry SDK. |
| 8297 |
const ( |
| 8298 |
// TelemetrySDKLanguageKey is the attribute Key conforming to the |
| 8299 |
// "telemetry.sdk.language" semantic conventions. It represents the |
| 8300 |
// language of the telemetry SDK. |
| 8301 |
// |
| 8302 |
// Type: Enum |
| 8303 |
// RequirementLevel: Required |
| 8304 |
// Stability: stable |
| 8305 |
TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") |
| 8306 |
|
| 8307 |
// TelemetrySDKNameKey is the attribute Key conforming to the |
| 8308 |
// "telemetry.sdk.name" semantic conventions. It represents the name of the |
| 8309 |
// telemetry SDK as defined above. |
| 8310 |
// |
| 8311 |
// Type: string |
| 8312 |
// RequirementLevel: Required |
| 8313 |
// Stability: stable |
| 8314 |
// Examples: 'opentelemetry' |
| 8315 |
// Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute |
| 8316 |
// to `opentelemetry`. |
| 8317 |
// If another SDK, like a fork or a vendor-provided implementation, is |
| 8318 |
// used, this SDK MUST set the |
| 8319 |
// `telemetry.sdk.name` attribute to the fully-qualified class or module |
| 8320 |
// name of this SDK's main entry point |
| 8321 |
// or another suitable identifier depending on the language. |
| 8322 |
// The identifier `opentelemetry` is reserved and MUST NOT be used in this |
| 8323 |
// case. |
| 8324 |
// All custom identifiers SHOULD be stable across different versions of an |
| 8325 |
// implementation. |
| 8326 |
TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") |
| 8327 |
|
| 8328 |
// TelemetrySDKVersionKey is the attribute Key conforming to the |
| 8329 |
// "telemetry.sdk.version" semantic conventions. It represents the version |
| 8330 |
// string of the telemetry SDK. |
| 8331 |
// |
| 8332 |
// Type: string |
| 8333 |
// RequirementLevel: Required |
| 8334 |
// Stability: stable |
| 8335 |
// Examples: '1.2.3' |
| 8336 |
TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") |
| 8337 |
|
| 8338 |
// TelemetryDistroNameKey is the attribute Key conforming to the |
| 8339 |
// "telemetry.distro.name" semantic conventions. It represents the name of |
| 8340 |
// the auto instrumentation agent or distribution, if used. |
| 8341 |
// |
| 8342 |
// Type: string |
| 8343 |
// RequirementLevel: Optional |
| 8344 |
// Stability: experimental |
| 8345 |
// Examples: 'parts-unlimited-java' |
| 8346 |
// Note: Official auto instrumentation agents and distributions SHOULD set |
| 8347 |
// the `telemetry.distro.name` attribute to |
| 8348 |
// a string starting with `opentelemetry-`, e.g. |
| 8349 |
// `opentelemetry-java-instrumentation`. |
| 8350 |
TelemetryDistroNameKey = attribute.Key("telemetry.distro.name") |
| 8351 |
|
| 8352 |
// TelemetryDistroVersionKey is the attribute Key conforming to the |
| 8353 |
// "telemetry.distro.version" semantic conventions. It represents the |
| 8354 |
// version string of the auto instrumentation agent or distribution, if |
| 8355 |
// used. |
| 8356 |
// |
| 8357 |
// Type: string |
| 8358 |
// RequirementLevel: Optional |
| 8359 |
// Stability: experimental |
| 8360 |
// Examples: '1.2.3' |
| 8361 |
TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") |
| 8362 |
) |
| 8363 |
|
| 8364 |
var ( |
| 8365 |
// cpp |
| 8366 |
TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") |
| 8367 |
// dotnet |
| 8368 |
TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") |
| 8369 |
// erlang |
| 8370 |
TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") |
| 8371 |
// go |
| 8372 |
TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") |
| 8373 |
// java |
| 8374 |
TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") |
| 8375 |
// nodejs |
| 8376 |
TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") |
| 8377 |
// php |
| 8378 |
TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") |
| 8379 |
// python |
| 8380 |
TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") |
| 8381 |
// ruby |
| 8382 |
TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") |
| 8383 |
// rust |
| 8384 |
TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") |
| 8385 |
// swift |
| 8386 |
TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") |
| 8387 |
// webjs |
| 8388 |
TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") |
| 8389 |
) |
| 8390 |
|
| 8391 |
// TelemetrySDKName returns an attribute KeyValue conforming to the |
| 8392 |
// "telemetry.sdk.name" semantic conventions. It represents the name of the |
| 8393 |
// telemetry SDK as defined above. |
| 8394 |
func TelemetrySDKName(val string) attribute.KeyValue { |
| 8395 |
return TelemetrySDKNameKey.String(val) |
| 8396 |
} |
| 8397 |
|
| 8398 |
// TelemetrySDKVersion returns an attribute KeyValue conforming to the |
| 8399 |
// "telemetry.sdk.version" semantic conventions. It represents the version |
| 8400 |
// string of the telemetry SDK. |
| 8401 |
func TelemetrySDKVersion(val string) attribute.KeyValue { |
| 8402 |
return TelemetrySDKVersionKey.String(val) |
| 8403 |
} |
| 8404 |
|
| 8405 |
// TelemetryDistroName returns an attribute KeyValue conforming to the |
| 8406 |
// "telemetry.distro.name" semantic conventions. It represents the name of the |
| 8407 |
// auto instrumentation agent or distribution, if used. |
| 8408 |
func TelemetryDistroName(val string) attribute.KeyValue { |
| 8409 |
return TelemetryDistroNameKey.String(val) |
| 8410 |
} |
| 8411 |
|
| 8412 |
// TelemetryDistroVersion returns an attribute KeyValue conforming to the |
| 8413 |
// "telemetry.distro.version" semantic conventions. It represents the version |
| 8414 |
// string of the auto instrumentation agent or distribution, if used. |
| 8415 |
func TelemetryDistroVersion(val string) attribute.KeyValue { |
| 8416 |
return TelemetryDistroVersionKey.String(val) |
| 8417 |
} |
| 8418 |
|
| 8419 |
// This group describes attributes specific to [software |
| 8420 |
// tests](https://en.wikipedia.org/wiki/Software_testing). |
| 8421 |
const ( |
| 8422 |
// TestCaseNameKey is the attribute Key conforming to the "test.case.name" |
| 8423 |
// semantic conventions. It represents the fully qualified human readable |
| 8424 |
// name of the [test case](https://en.wikipedia.org/wiki/Test_case). |
| 8425 |
// |
| 8426 |
// Type: string |
| 8427 |
// RequirementLevel: Optional |
| 8428 |
// Stability: experimental |
| 8429 |
// Examples: 'org.example.TestCase1.test1', |
| 8430 |
// 'example/tests/TestCase1.test1', 'ExampleTestCase1_test1' |
| 8431 |
TestCaseNameKey = attribute.Key("test.case.name") |
| 8432 |
|
| 8433 |
// TestCaseResultStatusKey is the attribute Key conforming to the |
| 8434 |
// "test.case.result.status" semantic conventions. It represents the status |
| 8435 |
// of the actual test case result from test execution. |
| 8436 |
// |
| 8437 |
// Type: Enum |
| 8438 |
// RequirementLevel: Optional |
| 8439 |
// Stability: experimental |
| 8440 |
// Examples: 'pass', 'fail' |
| 8441 |
TestCaseResultStatusKey = attribute.Key("test.case.result.status") |
| 8442 |
|
| 8443 |
// TestSuiteNameKey is the attribute Key conforming to the |
| 8444 |
// "test.suite.name" semantic conventions. It represents the human readable |
| 8445 |
// name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). |
| 8446 |
// |
| 8447 |
// Type: string |
| 8448 |
// RequirementLevel: Optional |
| 8449 |
// Stability: experimental |
| 8450 |
// Examples: 'TestSuite1' |
| 8451 |
TestSuiteNameKey = attribute.Key("test.suite.name") |
| 8452 |
|
| 8453 |
// TestSuiteRunStatusKey is the attribute Key conforming to the |
| 8454 |
// "test.suite.run.status" semantic conventions. It represents the status |
| 8455 |
// of the test suite run. |
| 8456 |
// |
| 8457 |
// Type: Enum |
| 8458 |
// RequirementLevel: Optional |
| 8459 |
// Stability: experimental |
| 8460 |
// Examples: 'success', 'failure', 'skipped', 'aborted', 'timed_out', |
| 8461 |
// 'in_progress' |
| 8462 |
TestSuiteRunStatusKey = attribute.Key("test.suite.run.status") |
| 8463 |
) |
| 8464 |
|
| 8465 |
var ( |
| 8466 |
// pass |
| 8467 |
TestCaseResultStatusPass = TestCaseResultStatusKey.String("pass") |
| 8468 |
// fail |
| 8469 |
TestCaseResultStatusFail = TestCaseResultStatusKey.String("fail") |
| 8470 |
) |
| 8471 |
|
| 8472 |
var ( |
| 8473 |
// success |
| 8474 |
TestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String("success") |
| 8475 |
// failure |
| 8476 |
TestSuiteRunStatusFailure = TestSuiteRunStatusKey.String("failure") |
| 8477 |
// skipped |
| 8478 |
TestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String("skipped") |
| 8479 |
// aborted |
| 8480 |
TestSuiteRunStatusAborted = TestSuiteRunStatusKey.String("aborted") |
| 8481 |
// timed_out |
| 8482 |
TestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String("timed_out") |
| 8483 |
// in_progress |
| 8484 |
TestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String("in_progress") |
| 8485 |
) |
| 8486 |
|
| 8487 |
// TestCaseName returns an attribute KeyValue conforming to the |
| 8488 |
// "test.case.name" semantic conventions. It represents the fully qualified |
| 8489 |
// human readable name of the [test |
| 8490 |
// case](https://en.wikipedia.org/wiki/Test_case). |
| 8491 |
func TestCaseName(val string) attribute.KeyValue { |
| 8492 |
return TestCaseNameKey.String(val) |
| 8493 |
} |
| 8494 |
|
| 8495 |
// TestSuiteName returns an attribute KeyValue conforming to the |
| 8496 |
// "test.suite.name" semantic conventions. It represents the human readable |
| 8497 |
// name of a [test suite](https://en.wikipedia.org/wiki/Test_suite). |
| 8498 |
func TestSuiteName(val string) attribute.KeyValue { |
| 8499 |
return TestSuiteNameKey.String(val) |
| 8500 |
} |
| 8501 |
|
| 8502 |
// These attributes may be used for any operation to store information about a |
| 8503 |
// thread that started a span. |
| 8504 |
const ( |
| 8505 |
// ThreadIDKey is the attribute Key conforming to the "thread.id" semantic |
| 8506 |
// conventions. It represents the current "managed" thread ID (as opposed |
| 8507 |
// to OS thread ID). |
| 8508 |
// |
| 8509 |
// Type: int |
| 8510 |
// RequirementLevel: Optional |
| 8511 |
// Stability: experimental |
| 8512 |
// Examples: 42 |
| 8513 |
ThreadIDKey = attribute.Key("thread.id") |
| 8514 |
|
| 8515 |
// ThreadNameKey is the attribute Key conforming to the "thread.name" |
| 8516 |
// semantic conventions. It represents the current thread name. |
| 8517 |
// |
| 8518 |
// Type: string |
| 8519 |
// RequirementLevel: Optional |
| 8520 |
// Stability: experimental |
| 8521 |
// Examples: 'main' |
| 8522 |
ThreadNameKey = attribute.Key("thread.name") |
| 8523 |
) |
| 8524 |
|
| 8525 |
// ThreadID returns an attribute KeyValue conforming to the "thread.id" |
| 8526 |
// semantic conventions. It represents the current "managed" thread ID (as |
| 8527 |
// opposed to OS thread ID). |
| 8528 |
func ThreadID(val int) attribute.KeyValue { |
| 8529 |
return ThreadIDKey.Int(val) |
| 8530 |
} |
| 8531 |
|
| 8532 |
// ThreadName returns an attribute KeyValue conforming to the "thread.name" |
| 8533 |
// semantic conventions. It represents the current thread name. |
| 8534 |
func ThreadName(val string) attribute.KeyValue { |
| 8535 |
return ThreadNameKey.String(val) |
| 8536 |
} |
| 8537 |
|
| 8538 |
// Semantic convention attributes in the TLS namespace. |
| 8539 |
const ( |
| 8540 |
// TLSCipherKey is the attribute Key conforming to the "tls.cipher" |
| 8541 |
// semantic conventions. It represents the string indicating the |
| 8542 |
// [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) |
| 8543 |
// used during the current connection. |
| 8544 |
// |
| 8545 |
// Type: string |
| 8546 |
// RequirementLevel: Optional |
| 8547 |
// Stability: experimental |
| 8548 |
// Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', |
| 8549 |
// 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' |
| 8550 |
// Note: The values allowed for `tls.cipher` MUST be one of the |
| 8551 |
// `Descriptions` of the [registered TLS Cipher |
| 8552 |
// Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). |
| 8553 |
TLSCipherKey = attribute.Key("tls.cipher") |
| 8554 |
|
| 8555 |
// TLSClientCertificateKey is the attribute Key conforming to the |
| 8556 |
// "tls.client.certificate" semantic conventions. It represents the |
| 8557 |
// pEM-encoded stand-alone certificate offered by the client. This is |
| 8558 |
// usually mutually-exclusive of `client.certificate_chain` since this |
| 8559 |
// value also exists in that list. |
| 8560 |
// |
| 8561 |
// Type: string |
| 8562 |
// RequirementLevel: Optional |
| 8563 |
// Stability: experimental |
| 8564 |
// Examples: 'MII...' |
| 8565 |
TLSClientCertificateKey = attribute.Key("tls.client.certificate") |
| 8566 |
|
| 8567 |
// TLSClientCertificateChainKey is the attribute Key conforming to the |
| 8568 |
// "tls.client.certificate_chain" semantic conventions. It represents the |
| 8569 |
// array of PEM-encoded certificates that make up the certificate chain |
| 8570 |
// offered by the client. This is usually mutually-exclusive of |
| 8571 |
// `client.certificate` since that value should be the first certificate in |
| 8572 |
// the chain. |
| 8573 |
// |
| 8574 |
// Type: string[] |
| 8575 |
// RequirementLevel: Optional |
| 8576 |
// Stability: experimental |
| 8577 |
// Examples: 'MII...', 'MI...' |
| 8578 |
TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain") |
| 8579 |
|
| 8580 |
// TLSClientHashMd5Key is the attribute Key conforming to the |
| 8581 |
// "tls.client.hash.md5" semantic conventions. It represents the |
| 8582 |
// certificate fingerprint using the MD5 digest of DER-encoded version of |
| 8583 |
// certificate offered by the client. For consistency with other hash |
| 8584 |
// values, this value should be formatted as an uppercase hash. |
| 8585 |
// |
| 8586 |
// Type: string |
| 8587 |
// RequirementLevel: Optional |
| 8588 |
// Stability: experimental |
| 8589 |
// Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' |
| 8590 |
TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5") |
| 8591 |
|
| 8592 |
// TLSClientHashSha1Key is the attribute Key conforming to the |
| 8593 |
// "tls.client.hash.sha1" semantic conventions. It represents the |
| 8594 |
// certificate fingerprint using the SHA1 digest of DER-encoded version of |
| 8595 |
// certificate offered by the client. For consistency with other hash |
| 8596 |
// values, this value should be formatted as an uppercase hash. |
| 8597 |
// |
| 8598 |
// Type: string |
| 8599 |
// RequirementLevel: Optional |
| 8600 |
// Stability: experimental |
| 8601 |
// Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' |
| 8602 |
TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1") |
| 8603 |
|
| 8604 |
// TLSClientHashSha256Key is the attribute Key conforming to the |
| 8605 |
// "tls.client.hash.sha256" semantic conventions. It represents the |
| 8606 |
// certificate fingerprint using the SHA256 digest of DER-encoded version |
| 8607 |
// of certificate offered by the client. For consistency with other hash |
| 8608 |
// values, this value should be formatted as an uppercase hash. |
| 8609 |
// |
| 8610 |
// Type: string |
| 8611 |
// RequirementLevel: Optional |
| 8612 |
// Stability: experimental |
| 8613 |
// Examples: |
| 8614 |
// '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' |
| 8615 |
TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256") |
| 8616 |
|
| 8617 |
// TLSClientIssuerKey is the attribute Key conforming to the |
| 8618 |
// "tls.client.issuer" semantic conventions. It represents the |
| 8619 |
// distinguished name of |
| 8620 |
// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) |
| 8621 |
// of the issuer of the x.509 certificate presented by the client. |
| 8622 |
// |
| 8623 |
// Type: string |
| 8624 |
// RequirementLevel: Optional |
| 8625 |
// Stability: experimental |
| 8626 |
// Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, |
| 8627 |
// DC=com' |
| 8628 |
TLSClientIssuerKey = attribute.Key("tls.client.issuer") |
| 8629 |
|
| 8630 |
// TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3" |
| 8631 |
// semantic conventions. It represents a hash that identifies clients based |
| 8632 |
// on how they perform an SSL/TLS handshake. |
| 8633 |
// |
| 8634 |
// Type: string |
| 8635 |
// RequirementLevel: Optional |
| 8636 |
// Stability: experimental |
| 8637 |
// Examples: 'd4e5b18d6b55c71272893221c96ba240' |
| 8638 |
TLSClientJa3Key = attribute.Key("tls.client.ja3") |
| 8639 |
|
| 8640 |
// TLSClientNotAfterKey is the attribute Key conforming to the |
| 8641 |
// "tls.client.not_after" semantic conventions. It represents the date/Time |
| 8642 |
// indicating when client certificate is no longer considered valid. |
| 8643 |
// |
| 8644 |
// Type: string |
| 8645 |
// RequirementLevel: Optional |
| 8646 |
// Stability: experimental |
| 8647 |
// Examples: '2021-01-01T00:00:00.000Z' |
| 8648 |
TLSClientNotAfterKey = attribute.Key("tls.client.not_after") |
| 8649 |
|
| 8650 |
// TLSClientNotBeforeKey is the attribute Key conforming to the |
| 8651 |
// "tls.client.not_before" semantic conventions. It represents the |
| 8652 |
// date/Time indicating when client certificate is first considered valid. |
| 8653 |
// |
| 8654 |
// Type: string |
| 8655 |
// RequirementLevel: Optional |
| 8656 |
// Stability: experimental |
| 8657 |
// Examples: '1970-01-01T00:00:00.000Z' |
| 8658 |
TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") |
| 8659 |
|
| 8660 |
// TLSClientSubjectKey is the attribute Key conforming to the |
| 8661 |
// "tls.client.subject" semantic conventions. It represents the |
| 8662 |
// distinguished name of subject of the x.509 certificate presented by the |
| 8663 |
// client. |
| 8664 |
// |
| 8665 |
// Type: string |
| 8666 |
// RequirementLevel: Optional |
| 8667 |
// Stability: experimental |
| 8668 |
// Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' |
| 8669 |
TLSClientSubjectKey = attribute.Key("tls.client.subject") |
| 8670 |
|
| 8671 |
// TLSClientSupportedCiphersKey is the attribute Key conforming to the |
| 8672 |
// "tls.client.supported_ciphers" semantic conventions. It represents the |
| 8673 |
// array of ciphers offered by the client during the client hello. |
| 8674 |
// |
| 8675 |
// Type: string[] |
| 8676 |
// RequirementLevel: Optional |
| 8677 |
// Stability: experimental |
| 8678 |
// Examples: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', |
| 8679 |
// 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', '...' |
| 8680 |
TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers") |
| 8681 |
|
| 8682 |
// TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic |
| 8683 |
// conventions. It represents the string indicating the curve used for the |
| 8684 |
// given cipher, when applicable |
| 8685 |
// |
| 8686 |
// Type: string |
| 8687 |
// RequirementLevel: Optional |
| 8688 |
// Stability: experimental |
| 8689 |
// Examples: 'secp256r1' |
| 8690 |
TLSCurveKey = attribute.Key("tls.curve") |
| 8691 |
|
| 8692 |
// TLSEstablishedKey is the attribute Key conforming to the |
| 8693 |
// "tls.established" semantic conventions. It represents the boolean flag |
| 8694 |
// indicating if the TLS negotiation was successful and transitioned to an |
| 8695 |
// encrypted tunnel. |
| 8696 |
// |
| 8697 |
// Type: boolean |
| 8698 |
// RequirementLevel: Optional |
| 8699 |
// Stability: experimental |
| 8700 |
// Examples: True |
| 8701 |
TLSEstablishedKey = attribute.Key("tls.established") |
| 8702 |
|
| 8703 |
// TLSNextProtocolKey is the attribute Key conforming to the |
| 8704 |
// "tls.next_protocol" semantic conventions. It represents the string |
| 8705 |
// indicating the protocol being tunneled. Per the values in the [IANA |
| 8706 |
// registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), |
| 8707 |
// this string should be lower case. |
| 8708 |
// |
| 8709 |
// Type: string |
| 8710 |
// RequirementLevel: Optional |
| 8711 |
// Stability: experimental |
| 8712 |
// Examples: 'http/1.1' |
| 8713 |
TLSNextProtocolKey = attribute.Key("tls.next_protocol") |
| 8714 |
|
| 8715 |
// TLSProtocolNameKey is the attribute Key conforming to the |
| 8716 |
// "tls.protocol.name" semantic conventions. It represents the normalized |
| 8717 |
// lowercase protocol name parsed from original string of the negotiated |
| 8718 |
// [SSL/TLS protocol |
| 8719 |
// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) |
| 8720 |
// |
| 8721 |
// Type: Enum |
| 8722 |
// RequirementLevel: Optional |
| 8723 |
// Stability: experimental |
| 8724 |
TLSProtocolNameKey = attribute.Key("tls.protocol.name") |
| 8725 |
|
| 8726 |
// TLSProtocolVersionKey is the attribute Key conforming to the |
| 8727 |
// "tls.protocol.version" semantic conventions. It represents the numeric |
| 8728 |
// part of the version parsed from the original string of the negotiated |
| 8729 |
// [SSL/TLS protocol |
| 8730 |
// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) |
| 8731 |
// |
| 8732 |
// Type: string |
| 8733 |
// RequirementLevel: Optional |
| 8734 |
// Stability: experimental |
| 8735 |
// Examples: '1.2', '3' |
| 8736 |
TLSProtocolVersionKey = attribute.Key("tls.protocol.version") |
| 8737 |
|
| 8738 |
// TLSResumedKey is the attribute Key conforming to the "tls.resumed" |
| 8739 |
// semantic conventions. It represents the boolean flag indicating if this |
| 8740 |
// TLS connection was resumed from an existing TLS negotiation. |
| 8741 |
// |
| 8742 |
// Type: boolean |
| 8743 |
// RequirementLevel: Optional |
| 8744 |
// Stability: experimental |
| 8745 |
// Examples: True |
| 8746 |
TLSResumedKey = attribute.Key("tls.resumed") |
| 8747 |
|
| 8748 |
// TLSServerCertificateKey is the attribute Key conforming to the |
| 8749 |
// "tls.server.certificate" semantic conventions. It represents the |
| 8750 |
// pEM-encoded stand-alone certificate offered by the server. This is |
| 8751 |
// usually mutually-exclusive of `server.certificate_chain` since this |
| 8752 |
// value also exists in that list. |
| 8753 |
// |
| 8754 |
// Type: string |
| 8755 |
// RequirementLevel: Optional |
| 8756 |
// Stability: experimental |
| 8757 |
// Examples: 'MII...' |
| 8758 |
TLSServerCertificateKey = attribute.Key("tls.server.certificate") |
| 8759 |
|
| 8760 |
// TLSServerCertificateChainKey is the attribute Key conforming to the |
| 8761 |
// "tls.server.certificate_chain" semantic conventions. It represents the |
| 8762 |
// array of PEM-encoded certificates that make up the certificate chain |
| 8763 |
// offered by the server. This is usually mutually-exclusive of |
| 8764 |
// `server.certificate` since that value should be the first certificate in |
| 8765 |
// the chain. |
| 8766 |
// |
| 8767 |
// Type: string[] |
| 8768 |
// RequirementLevel: Optional |
| 8769 |
// Stability: experimental |
| 8770 |
// Examples: 'MII...', 'MI...' |
| 8771 |
TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain") |
| 8772 |
|
| 8773 |
// TLSServerHashMd5Key is the attribute Key conforming to the |
| 8774 |
// "tls.server.hash.md5" semantic conventions. It represents the |
| 8775 |
// certificate fingerprint using the MD5 digest of DER-encoded version of |
| 8776 |
// certificate offered by the server. For consistency with other hash |
| 8777 |
// values, this value should be formatted as an uppercase hash. |
| 8778 |
// |
| 8779 |
// Type: string |
| 8780 |
// RequirementLevel: Optional |
| 8781 |
// Stability: experimental |
| 8782 |
// Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' |
| 8783 |
TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5") |
| 8784 |
|
| 8785 |
// TLSServerHashSha1Key is the attribute Key conforming to the |
| 8786 |
// "tls.server.hash.sha1" semantic conventions. It represents the |
| 8787 |
// certificate fingerprint using the SHA1 digest of DER-encoded version of |
| 8788 |
// certificate offered by the server. For consistency with other hash |
| 8789 |
// values, this value should be formatted as an uppercase hash. |
| 8790 |
// |
| 8791 |
// Type: string |
| 8792 |
// RequirementLevel: Optional |
| 8793 |
// Stability: experimental |
| 8794 |
// Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' |
| 8795 |
TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1") |
| 8796 |
|
| 8797 |
// TLSServerHashSha256Key is the attribute Key conforming to the |
| 8798 |
// "tls.server.hash.sha256" semantic conventions. It represents the |
| 8799 |
// certificate fingerprint using the SHA256 digest of DER-encoded version |
| 8800 |
// of certificate offered by the server. For consistency with other hash |
| 8801 |
// values, this value should be formatted as an uppercase hash. |
| 8802 |
// |
| 8803 |
// Type: string |
| 8804 |
// RequirementLevel: Optional |
| 8805 |
// Stability: experimental |
| 8806 |
// Examples: |
| 8807 |
// '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' |
| 8808 |
TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256") |
| 8809 |
|
| 8810 |
// TLSServerIssuerKey is the attribute Key conforming to the |
| 8811 |
// "tls.server.issuer" semantic conventions. It represents the |
| 8812 |
// distinguished name of |
| 8813 |
// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) |
| 8814 |
// of the issuer of the x.509 certificate presented by the client. |
| 8815 |
// |
| 8816 |
// Type: string |
| 8817 |
// RequirementLevel: Optional |
| 8818 |
// Stability: experimental |
| 8819 |
// Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, |
| 8820 |
// DC=com' |
| 8821 |
TLSServerIssuerKey = attribute.Key("tls.server.issuer") |
| 8822 |
|
| 8823 |
// TLSServerJa3sKey is the attribute Key conforming to the |
| 8824 |
// "tls.server.ja3s" semantic conventions. It represents a hash that |
| 8825 |
// identifies servers based on how they perform an SSL/TLS handshake. |
| 8826 |
// |
| 8827 |
// Type: string |
| 8828 |
// RequirementLevel: Optional |
| 8829 |
// Stability: experimental |
| 8830 |
// Examples: 'd4e5b18d6b55c71272893221c96ba240' |
| 8831 |
TLSServerJa3sKey = attribute.Key("tls.server.ja3s") |
| 8832 |
|
| 8833 |
// TLSServerNotAfterKey is the attribute Key conforming to the |
| 8834 |
// "tls.server.not_after" semantic conventions. It represents the date/Time |
| 8835 |
// indicating when server certificate is no longer considered valid. |
| 8836 |
// |
| 8837 |
// Type: string |
| 8838 |
// RequirementLevel: Optional |
| 8839 |
// Stability: experimental |
| 8840 |
// Examples: '2021-01-01T00:00:00.000Z' |
| 8841 |
TLSServerNotAfterKey = attribute.Key("tls.server.not_after") |
| 8842 |
|
| 8843 |
// TLSServerNotBeforeKey is the attribute Key conforming to the |
| 8844 |
// "tls.server.not_before" semantic conventions. It represents the |
| 8845 |
// date/Time indicating when server certificate is first considered valid. |
| 8846 |
// |
| 8847 |
// Type: string |
| 8848 |
// RequirementLevel: Optional |
| 8849 |
// Stability: experimental |
| 8850 |
// Examples: '1970-01-01T00:00:00.000Z' |
| 8851 |
TLSServerNotBeforeKey = attribute.Key("tls.server.not_before") |
| 8852 |
|
| 8853 |
// TLSServerSubjectKey is the attribute Key conforming to the |
| 8854 |
// "tls.server.subject" semantic conventions. It represents the |
| 8855 |
// distinguished name of subject of the x.509 certificate presented by the |
| 8856 |
// server. |
| 8857 |
// |
| 8858 |
// Type: string |
| 8859 |
// RequirementLevel: Optional |
| 8860 |
// Stability: experimental |
| 8861 |
// Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' |
| 8862 |
TLSServerSubjectKey = attribute.Key("tls.server.subject") |
| 8863 |
) |
| 8864 |
|
| 8865 |
var ( |
| 8866 |
// ssl |
| 8867 |
TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") |
| 8868 |
// tls |
| 8869 |
TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") |
| 8870 |
) |
| 8871 |
|
| 8872 |
// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" |
| 8873 |
// semantic conventions. It represents the string indicating the |
| 8874 |
// [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used |
| 8875 |
// during the current connection. |
| 8876 |
func TLSCipher(val string) attribute.KeyValue { |
| 8877 |
return TLSCipherKey.String(val) |
| 8878 |
} |
| 8879 |
|
| 8880 |
// TLSClientCertificate returns an attribute KeyValue conforming to the |
| 8881 |
// "tls.client.certificate" semantic conventions. It represents the pEM-encoded |
| 8882 |
// stand-alone certificate offered by the client. This is usually |
| 8883 |
// mutually-exclusive of `client.certificate_chain` since this value also |
| 8884 |
// exists in that list. |
| 8885 |
func TLSClientCertificate(val string) attribute.KeyValue { |
| 8886 |
return TLSClientCertificateKey.String(val) |
| 8887 |
} |
| 8888 |
|
| 8889 |
// TLSClientCertificateChain returns an attribute KeyValue conforming to the |
| 8890 |
// "tls.client.certificate_chain" semantic conventions. It represents the array |
| 8891 |
// of PEM-encoded certificates that make up the certificate chain offered by |
| 8892 |
// the client. This is usually mutually-exclusive of `client.certificate` since |
| 8893 |
// that value should be the first certificate in the chain. |
| 8894 |
func TLSClientCertificateChain(val ...string) attribute.KeyValue { |
| 8895 |
return TLSClientCertificateChainKey.StringSlice(val) |
| 8896 |
} |
| 8897 |
|
| 8898 |
// TLSClientHashMd5 returns an attribute KeyValue conforming to the |
| 8899 |
// "tls.client.hash.md5" semantic conventions. It represents the certificate |
| 8900 |
// fingerprint using the MD5 digest of DER-encoded version of certificate |
| 8901 |
// offered by the client. For consistency with other hash values, this value |
| 8902 |
// should be formatted as an uppercase hash. |
| 8903 |
func TLSClientHashMd5(val string) attribute.KeyValue { |
| 8904 |
return TLSClientHashMd5Key.String(val) |
| 8905 |
} |
| 8906 |
|
| 8907 |
// TLSClientHashSha1 returns an attribute KeyValue conforming to the |
| 8908 |
// "tls.client.hash.sha1" semantic conventions. It represents the certificate |
| 8909 |
// fingerprint using the SHA1 digest of DER-encoded version of certificate |
| 8910 |
// offered by the client. For consistency with other hash values, this value |
| 8911 |
// should be formatted as an uppercase hash. |
| 8912 |
func TLSClientHashSha1(val string) attribute.KeyValue { |
| 8913 |
return TLSClientHashSha1Key.String(val) |
| 8914 |
} |
| 8915 |
|
| 8916 |
// TLSClientHashSha256 returns an attribute KeyValue conforming to the |
| 8917 |
// "tls.client.hash.sha256" semantic conventions. It represents the certificate |
| 8918 |
// fingerprint using the SHA256 digest of DER-encoded version of certificate |
| 8919 |
// offered by the client. For consistency with other hash values, this value |
| 8920 |
// should be formatted as an uppercase hash. |
| 8921 |
func TLSClientHashSha256(val string) attribute.KeyValue { |
| 8922 |
return TLSClientHashSha256Key.String(val) |
| 8923 |
} |
| 8924 |
|
| 8925 |
// TLSClientIssuer returns an attribute KeyValue conforming to the |
| 8926 |
// "tls.client.issuer" semantic conventions. It represents the distinguished |
| 8927 |
// name of |
| 8928 |
// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of |
| 8929 |
// the issuer of the x.509 certificate presented by the client. |
| 8930 |
func TLSClientIssuer(val string) attribute.KeyValue { |
| 8931 |
return TLSClientIssuerKey.String(val) |
| 8932 |
} |
| 8933 |
|
| 8934 |
// TLSClientJa3 returns an attribute KeyValue conforming to the |
| 8935 |
// "tls.client.ja3" semantic conventions. It represents a hash that identifies |
| 8936 |
// clients based on how they perform an SSL/TLS handshake. |
| 8937 |
func TLSClientJa3(val string) attribute.KeyValue { |
| 8938 |
return TLSClientJa3Key.String(val) |
| 8939 |
} |
| 8940 |
|
| 8941 |
// TLSClientNotAfter returns an attribute KeyValue conforming to the |
| 8942 |
// "tls.client.not_after" semantic conventions. It represents the date/Time |
| 8943 |
// indicating when client certificate is no longer considered valid. |
| 8944 |
func TLSClientNotAfter(val string) attribute.KeyValue { |
| 8945 |
return TLSClientNotAfterKey.String(val) |
| 8946 |
} |
| 8947 |
|
| 8948 |
// TLSClientNotBefore returns an attribute KeyValue conforming to the |
| 8949 |
// "tls.client.not_before" semantic conventions. It represents the date/Time |
| 8950 |
// indicating when client certificate is first considered valid. |
| 8951 |
func TLSClientNotBefore(val string) attribute.KeyValue { |
| 8952 |
return TLSClientNotBeforeKey.String(val) |
| 8953 |
} |
| 8954 |
|
| 8955 |
// TLSClientSubject returns an attribute KeyValue conforming to the |
| 8956 |
// "tls.client.subject" semantic conventions. It represents the distinguished |
| 8957 |
// name of subject of the x.509 certificate presented by the client. |
| 8958 |
func TLSClientSubject(val string) attribute.KeyValue { |
| 8959 |
return TLSClientSubjectKey.String(val) |
| 8960 |
} |
| 8961 |
|
| 8962 |
// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the |
| 8963 |
// "tls.client.supported_ciphers" semantic conventions. It represents the array |
| 8964 |
// of ciphers offered by the client during the client hello. |
| 8965 |
func TLSClientSupportedCiphers(val ...string) attribute.KeyValue { |
| 8966 |
return TLSClientSupportedCiphersKey.StringSlice(val) |
| 8967 |
} |
| 8968 |
|
| 8969 |
// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" |
| 8970 |
// semantic conventions. It represents the string indicating the curve used for |
| 8971 |
// the given cipher, when applicable |
| 8972 |
func TLSCurve(val string) attribute.KeyValue { |
| 8973 |
return TLSCurveKey.String(val) |
| 8974 |
} |
| 8975 |
|
| 8976 |
// TLSEstablished returns an attribute KeyValue conforming to the |
| 8977 |
// "tls.established" semantic conventions. It represents the boolean flag |
| 8978 |
// indicating if the TLS negotiation was successful and transitioned to an |
| 8979 |
// encrypted tunnel. |
| 8980 |
func TLSEstablished(val bool) attribute.KeyValue { |
| 8981 |
return TLSEstablishedKey.Bool(val) |
| 8982 |
} |
| 8983 |
|
| 8984 |
// TLSNextProtocol returns an attribute KeyValue conforming to the |
| 8985 |
// "tls.next_protocol" semantic conventions. It represents the string |
| 8986 |
// indicating the protocol being tunneled. Per the values in the [IANA |
| 8987 |
// registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), |
| 8988 |
// this string should be lower case. |
| 8989 |
func TLSNextProtocol(val string) attribute.KeyValue { |
| 8990 |
return TLSNextProtocolKey.String(val) |
| 8991 |
} |
| 8992 |
|
| 8993 |
// TLSProtocolVersion returns an attribute KeyValue conforming to the |
| 8994 |
// "tls.protocol.version" semantic conventions. It represents the numeric part |
| 8995 |
// of the version parsed from the original string of the negotiated [SSL/TLS |
| 8996 |
// protocol |
| 8997 |
// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) |
| 8998 |
func TLSProtocolVersion(val string) attribute.KeyValue { |
| 8999 |
return TLSProtocolVersionKey.String(val) |
| 9000 |
} |
| 9001 |
|
| 9002 |
// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed" |
| 9003 |
// semantic conventions. It represents the boolean flag indicating if this TLS |
| 9004 |
// connection was resumed from an existing TLS negotiation. |
| 9005 |
func TLSResumed(val bool) attribute.KeyValue { |
| 9006 |
return TLSResumedKey.Bool(val) |
| 9007 |
} |
| 9008 |
|
| 9009 |
// TLSServerCertificate returns an attribute KeyValue conforming to the |
| 9010 |
// "tls.server.certificate" semantic conventions. It represents the pEM-encoded |
| 9011 |
// stand-alone certificate offered by the server. This is usually |
| 9012 |
// mutually-exclusive of `server.certificate_chain` since this value also |
| 9013 |
// exists in that list. |
| 9014 |
func TLSServerCertificate(val string) attribute.KeyValue { |
| 9015 |
return TLSServerCertificateKey.String(val) |
| 9016 |
} |
| 9017 |
|
| 9018 |
// TLSServerCertificateChain returns an attribute KeyValue conforming to the |
| 9019 |
// "tls.server.certificate_chain" semantic conventions. It represents the array |
| 9020 |
// of PEM-encoded certificates that make up the certificate chain offered by |
| 9021 |
// the server. This is usually mutually-exclusive of `server.certificate` since |
| 9022 |
// that value should be the first certificate in the chain. |
| 9023 |
func TLSServerCertificateChain(val ...string) attribute.KeyValue { |
| 9024 |
return TLSServerCertificateChainKey.StringSlice(val) |
| 9025 |
} |
| 9026 |
|
| 9027 |
// TLSServerHashMd5 returns an attribute KeyValue conforming to the |
| 9028 |
// "tls.server.hash.md5" semantic conventions. It represents the certificate |
| 9029 |
// fingerprint using the MD5 digest of DER-encoded version of certificate |
| 9030 |
// offered by the server. For consistency with other hash values, this value |
| 9031 |
// should be formatted as an uppercase hash. |
| 9032 |
func TLSServerHashMd5(val string) attribute.KeyValue { |
| 9033 |
return TLSServerHashMd5Key.String(val) |
| 9034 |
} |
| 9035 |
|
| 9036 |
// TLSServerHashSha1 returns an attribute KeyValue conforming to the |
| 9037 |
// "tls.server.hash.sha1" semantic conventions. It represents the certificate |
| 9038 |
// fingerprint using the SHA1 digest of DER-encoded version of certificate |
| 9039 |
// offered by the server. For consistency with other hash values, this value |
| 9040 |
// should be formatted as an uppercase hash. |
| 9041 |
func TLSServerHashSha1(val string) attribute.KeyValue { |
| 9042 |
return TLSServerHashSha1Key.String(val) |
| 9043 |
} |
| 9044 |
|
| 9045 |
// TLSServerHashSha256 returns an attribute KeyValue conforming to the |
| 9046 |
// "tls.server.hash.sha256" semantic conventions. It represents the certificate |
| 9047 |
// fingerprint using the SHA256 digest of DER-encoded version of certificate |
| 9048 |
// offered by the server. For consistency with other hash values, this value |
| 9049 |
// should be formatted as an uppercase hash. |
| 9050 |
func TLSServerHashSha256(val string) attribute.KeyValue { |
| 9051 |
return TLSServerHashSha256Key.String(val) |
| 9052 |
} |
| 9053 |
|
| 9054 |
// TLSServerIssuer returns an attribute KeyValue conforming to the |
| 9055 |
// "tls.server.issuer" semantic conventions. It represents the distinguished |
| 9056 |
// name of |
| 9057 |
// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of |
| 9058 |
// the issuer of the x.509 certificate presented by the client. |
| 9059 |
func TLSServerIssuer(val string) attribute.KeyValue { |
| 9060 |
return TLSServerIssuerKey.String(val) |
| 9061 |
} |
| 9062 |
|
| 9063 |
// TLSServerJa3s returns an attribute KeyValue conforming to the |
| 9064 |
// "tls.server.ja3s" semantic conventions. It represents a hash that identifies |
| 9065 |
// servers based on how they perform an SSL/TLS handshake. |
| 9066 |
func TLSServerJa3s(val string) attribute.KeyValue { |
| 9067 |
return TLSServerJa3sKey.String(val) |
| 9068 |
} |
| 9069 |
|
| 9070 |
// TLSServerNotAfter returns an attribute KeyValue conforming to the |
| 9071 |
// "tls.server.not_after" semantic conventions. It represents the date/Time |
| 9072 |
// indicating when server certificate is no longer considered valid. |
| 9073 |
func TLSServerNotAfter(val string) attribute.KeyValue { |
| 9074 |
return TLSServerNotAfterKey.String(val) |
| 9075 |
} |
| 9076 |
|
| 9077 |
// TLSServerNotBefore returns an attribute KeyValue conforming to the |
| 9078 |
// "tls.server.not_before" semantic conventions. It represents the date/Time |
| 9079 |
// indicating when server certificate is first considered valid. |
| 9080 |
func TLSServerNotBefore(val string) attribute.KeyValue { |
| 9081 |
return TLSServerNotBeforeKey.String(val) |
| 9082 |
} |
| 9083 |
|
| 9084 |
// TLSServerSubject returns an attribute KeyValue conforming to the |
| 9085 |
// "tls.server.subject" semantic conventions. It represents the distinguished |
| 9086 |
// name of subject of the x.509 certificate presented by the server. |
| 9087 |
func TLSServerSubject(val string) attribute.KeyValue { |
| 9088 |
return TLSServerSubjectKey.String(val) |
| 9089 |
} |
| 9090 |
|
| 9091 |
// Attributes describing URL. |
| 9092 |
const ( |
| 9093 |
// URLDomainKey is the attribute Key conforming to the "url.domain" |
| 9094 |
// semantic conventions. It represents the domain extracted from the |
| 9095 |
// `url.full`, such as "opentelemetry.io". |
| 9096 |
// |
| 9097 |
// Type: string |
| 9098 |
// RequirementLevel: Optional |
| 9099 |
// Stability: experimental |
| 9100 |
// Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2', |
| 9101 |
// '[1080:0:0:0:8:800:200C:417A]' |
| 9102 |
// Note: In some cases a URL may refer to an IP and/or port directly, |
| 9103 |
// without a domain name. In this case, the IP address would go to the |
| 9104 |
// domain field. If the URL contains a [literal IPv6 |
| 9105 |
// address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by |
| 9106 |
// `[` and `]`, the `[` and `]` characters should also be captured in the |
| 9107 |
// domain field. |
| 9108 |
URLDomainKey = attribute.Key("url.domain") |
| 9109 |
|
| 9110 |
// URLExtensionKey is the attribute Key conforming to the "url.extension" |
| 9111 |
// semantic conventions. It represents the file extension extracted from |
| 9112 |
// the `url.full`, excluding the leading dot. |
| 9113 |
// |
| 9114 |
// Type: string |
| 9115 |
// RequirementLevel: Optional |
| 9116 |
// Stability: experimental |
| 9117 |
// Examples: 'png', 'gz' |
| 9118 |
// Note: The file extension is only set if it exists, as not every url has |
| 9119 |
// a file extension. When the file name has multiple extensions |
| 9120 |
// `example.tar.gz`, only the last one should be captured `gz`, not |
| 9121 |
// `tar.gz`. |
| 9122 |
URLExtensionKey = attribute.Key("url.extension") |
| 9123 |
|
| 9124 |
// URLFragmentKey is the attribute Key conforming to the "url.fragment" |
| 9125 |
// semantic conventions. It represents the [URI |
| 9126 |
// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component |
| 9127 |
// |
| 9128 |
// Type: string |
| 9129 |
// RequirementLevel: Optional |
| 9130 |
// Stability: stable |
| 9131 |
// Examples: 'SemConv' |
| 9132 |
URLFragmentKey = attribute.Key("url.fragment") |
| 9133 |
|
| 9134 |
// URLFullKey is the attribute Key conforming to the "url.full" semantic |
| 9135 |
// conventions. It represents the absolute URL describing a network |
| 9136 |
// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) |
| 9137 |
// |
| 9138 |
// Type: string |
| 9139 |
// RequirementLevel: Optional |
| 9140 |
// Stability: stable |
| 9141 |
// Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', |
| 9142 |
// '//localhost' |
| 9143 |
// Note: For network calls, URL usually has |
| 9144 |
// `scheme://host[:port][path][?query][#fragment]` format, where the |
| 9145 |
// fragment is not transmitted over HTTP, but if it is known, it SHOULD be |
| 9146 |
// included nevertheless. |
| 9147 |
// `url.full` MUST NOT contain credentials passed via URL in form of |
| 9148 |
// `https://username:[email protected]/`. In such case username and |
| 9149 |
// password SHOULD be redacted and attribute's value SHOULD be |
| 9150 |
// `https://REDACTED:[email protected]/`. |
| 9151 |
// `url.full` SHOULD capture the absolute URL when it is available (or can |
| 9152 |
// be reconstructed). Sensitive content provided in `url.full` SHOULD be |
| 9153 |
// scrubbed when instrumentations can identify it. |
| 9154 |
URLFullKey = attribute.Key("url.full") |
| 9155 |
|
| 9156 |
// URLOriginalKey is the attribute Key conforming to the "url.original" |
| 9157 |
// semantic conventions. It represents the unmodified original URL as seen |
| 9158 |
// in the event source. |
| 9159 |
// |
| 9160 |
// Type: string |
| 9161 |
// RequirementLevel: Optional |
| 9162 |
// Stability: experimental |
| 9163 |
// Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', |
| 9164 |
// 'search?q=OpenTelemetry' |
| 9165 |
// Note: In network monitoring, the observed URL may be a full URL, whereas |
| 9166 |
// in access logs, the URL is often just represented as a path. This field |
| 9167 |
// is meant to represent the URL as it was observed, complete or not. |
| 9168 |
// `url.original` might contain credentials passed via URL in form of |
| 9169 |
// `https://username:[email protected]/`. In such case password and |
| 9170 |
// username SHOULD NOT be redacted and attribute's value SHOULD remain the |
| 9171 |
// same. |
| 9172 |
URLOriginalKey = attribute.Key("url.original") |
| 9173 |
|
| 9174 |
// URLPathKey is the attribute Key conforming to the "url.path" semantic |
| 9175 |
// conventions. It represents the [URI |
| 9176 |
// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component |
| 9177 |
// |
| 9178 |
// Type: string |
| 9179 |
// RequirementLevel: Optional |
| 9180 |
// Stability: stable |
| 9181 |
// Examples: '/search' |
| 9182 |
// Note: Sensitive content provided in `url.path` SHOULD be scrubbed when |
| 9183 |
// instrumentations can identify it. |
| 9184 |
URLPathKey = attribute.Key("url.path") |
| 9185 |
|
| 9186 |
// URLPortKey is the attribute Key conforming to the "url.port" semantic |
| 9187 |
// conventions. It represents the port extracted from the `url.full` |
| 9188 |
// |
| 9189 |
// Type: int |
| 9190 |
// RequirementLevel: Optional |
| 9191 |
// Stability: experimental |
| 9192 |
// Examples: 443 |
| 9193 |
URLPortKey = attribute.Key("url.port") |
| 9194 |
|
| 9195 |
// URLQueryKey is the attribute Key conforming to the "url.query" semantic |
| 9196 |
// conventions. It represents the [URI |
| 9197 |
// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component |
| 9198 |
// |
| 9199 |
// Type: string |
| 9200 |
// RequirementLevel: Optional |
| 9201 |
// Stability: stable |
| 9202 |
// Examples: 'q=OpenTelemetry' |
| 9203 |
// Note: Sensitive content provided in `url.query` SHOULD be scrubbed when |
| 9204 |
// instrumentations can identify it. |
| 9205 |
URLQueryKey = attribute.Key("url.query") |
| 9206 |
|
| 9207 |
// URLRegisteredDomainKey is the attribute Key conforming to the |
| 9208 |
// "url.registered_domain" semantic conventions. It represents the highest |
| 9209 |
// registered url domain, stripped of the subdomain. |
| 9210 |
// |
| 9211 |
// Type: string |
| 9212 |
// RequirementLevel: Optional |
| 9213 |
// Stability: experimental |
| 9214 |
// Examples: 'example.com', 'foo.co.uk' |
| 9215 |
// Note: This value can be determined precisely with the [public suffix |
| 9216 |
// list](http://publicsuffix.org). For example, the registered domain for |
| 9217 |
// `foo.example.com` is `example.com`. Trying to approximate this by simply |
| 9218 |
// taking the last two labels will not work well for TLDs such as `co.uk`. |
| 9219 |
URLRegisteredDomainKey = attribute.Key("url.registered_domain") |
| 9220 |
|
| 9221 |
// URLSchemeKey is the attribute Key conforming to the "url.scheme" |
| 9222 |
// semantic conventions. It represents the [URI |
| 9223 |
// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component |
| 9224 |
// identifying the used protocol. |
| 9225 |
// |
| 9226 |
// Type: string |
| 9227 |
// RequirementLevel: Optional |
| 9228 |
// Stability: stable |
| 9229 |
// Examples: 'https', 'ftp', 'telnet' |
| 9230 |
URLSchemeKey = attribute.Key("url.scheme") |
| 9231 |
|
| 9232 |
// URLSubdomainKey is the attribute Key conforming to the "url.subdomain" |
| 9233 |
// semantic conventions. It represents the subdomain portion of a fully |
| 9234 |
// qualified domain name includes all of the names except the host name |
| 9235 |
// under the registered_domain. In a partially qualified domain, or if the |
| 9236 |
// qualification level of the full name cannot be determined, subdomain |
| 9237 |
// contains all of the names below the registered domain. |
| 9238 |
// |
| 9239 |
// Type: string |
| 9240 |
// RequirementLevel: Optional |
| 9241 |
// Stability: experimental |
| 9242 |
// Examples: 'east', 'sub2.sub1' |
| 9243 |
// Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If |
| 9244 |
// the domain has multiple levels of subdomain, such as |
| 9245 |
// `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, |
| 9246 |
// with no trailing period. |
| 9247 |
URLSubdomainKey = attribute.Key("url.subdomain") |
| 9248 |
|
| 9249 |
// URLTemplateKey is the attribute Key conforming to the "url.template" |
| 9250 |
// semantic conventions. It represents the low-cardinality template of an |
| 9251 |
// [absolute path |
| 9252 |
// reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). |
| 9253 |
// |
| 9254 |
// Type: string |
| 9255 |
// RequirementLevel: Optional |
| 9256 |
// Stability: experimental |
| 9257 |
// Examples: '/users/{id}', '/users/:id', '/users?id={id}' |
| 9258 |
URLTemplateKey = attribute.Key("url.template") |
| 9259 |
|
| 9260 |
// URLTopLevelDomainKey is the attribute Key conforming to the |
| 9261 |
// "url.top_level_domain" semantic conventions. It represents the effective |
| 9262 |
// top level domain (eTLD), also known as the domain suffix, is the last |
| 9263 |
// part of the domain name. For example, the top level domain for |
| 9264 |
// example.com is `com`. |
| 9265 |
// |
| 9266 |
// Type: string |
| 9267 |
// RequirementLevel: Optional |
| 9268 |
// Stability: experimental |
| 9269 |
// Examples: 'com', 'co.uk' |
| 9270 |
// Note: This value can be determined precisely with the [public suffix |
| 9271 |
// list](http://publicsuffix.org). |
| 9272 |
URLTopLevelDomainKey = attribute.Key("url.top_level_domain") |
| 9273 |
) |
| 9274 |
|
| 9275 |
// URLDomain returns an attribute KeyValue conforming to the "url.domain" |
| 9276 |
// semantic conventions. It represents the domain extracted from the |
| 9277 |
// `url.full`, such as "opentelemetry.io". |
| 9278 |
func URLDomain(val string) attribute.KeyValue { |
| 9279 |
return URLDomainKey.String(val) |
| 9280 |
} |
| 9281 |
|
| 9282 |
// URLExtension returns an attribute KeyValue conforming to the |
| 9283 |
// "url.extension" semantic conventions. It represents the file extension |
| 9284 |
// extracted from the `url.full`, excluding the leading dot. |
| 9285 |
func URLExtension(val string) attribute.KeyValue { |
| 9286 |
return URLExtensionKey.String(val) |
| 9287 |
} |
| 9288 |
|
| 9289 |
// URLFragment returns an attribute KeyValue conforming to the |
| 9290 |
// "url.fragment" semantic conventions. It represents the [URI |
| 9291 |
// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component |
| 9292 |
func URLFragment(val string) attribute.KeyValue { |
| 9293 |
return URLFragmentKey.String(val) |
| 9294 |
} |
| 9295 |
|
| 9296 |
// URLFull returns an attribute KeyValue conforming to the "url.full" |
| 9297 |
// semantic conventions. It represents the absolute URL describing a network |
| 9298 |
// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) |
| 9299 |
func URLFull(val string) attribute.KeyValue { |
| 9300 |
return URLFullKey.String(val) |
| 9301 |
} |
| 9302 |
|
| 9303 |
// URLOriginal returns an attribute KeyValue conforming to the |
| 9304 |
// "url.original" semantic conventions. It represents the unmodified original |
| 9305 |
// URL as seen in the event source. |
| 9306 |
func URLOriginal(val string) attribute.KeyValue { |
| 9307 |
return URLOriginalKey.String(val) |
| 9308 |
} |
| 9309 |
|
| 9310 |
// URLPath returns an attribute KeyValue conforming to the "url.path" |
| 9311 |
// semantic conventions. It represents the [URI |
| 9312 |
// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component |
| 9313 |
func URLPath(val string) attribute.KeyValue { |
| 9314 |
return URLPathKey.String(val) |
| 9315 |
} |
| 9316 |
|
| 9317 |
// URLPort returns an attribute KeyValue conforming to the "url.port" |
| 9318 |
// semantic conventions. It represents the port extracted from the `url.full` |
| 9319 |
func URLPort(val int) attribute.KeyValue { |
| 9320 |
return URLPortKey.Int(val) |
| 9321 |
} |
| 9322 |
|
| 9323 |
// URLQuery returns an attribute KeyValue conforming to the "url.query" |
| 9324 |
// semantic conventions. It represents the [URI |
| 9325 |
// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component |
| 9326 |
func URLQuery(val string) attribute.KeyValue { |
| 9327 |
return URLQueryKey.String(val) |
| 9328 |
} |
| 9329 |
|
| 9330 |
// URLRegisteredDomain returns an attribute KeyValue conforming to the |
| 9331 |
// "url.registered_domain" semantic conventions. It represents the highest |
| 9332 |
// registered url domain, stripped of the subdomain. |
| 9333 |
func URLRegisteredDomain(val string) attribute.KeyValue { |
| 9334 |
return URLRegisteredDomainKey.String(val) |
| 9335 |
} |
| 9336 |
|
| 9337 |
// URLScheme returns an attribute KeyValue conforming to the "url.scheme" |
| 9338 |
// semantic conventions. It represents the [URI |
| 9339 |
// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component |
| 9340 |
// identifying the used protocol. |
| 9341 |
func URLScheme(val string) attribute.KeyValue { |
| 9342 |
return URLSchemeKey.String(val) |
| 9343 |
} |
| 9344 |
|
| 9345 |
// URLSubdomain returns an attribute KeyValue conforming to the |
| 9346 |
// "url.subdomain" semantic conventions. It represents the subdomain portion of |
| 9347 |
// a fully qualified domain name includes all of the names except the host name |
| 9348 |
// under the registered_domain. In a partially qualified domain, or if the |
| 9349 |
// qualification level of the full name cannot be determined, subdomain |
| 9350 |
// contains all of the names below the registered domain. |
| 9351 |
func URLSubdomain(val string) attribute.KeyValue { |
| 9352 |
return URLSubdomainKey.String(val) |
| 9353 |
} |
| 9354 |
|
| 9355 |
// URLTemplate returns an attribute KeyValue conforming to the |
| 9356 |
// "url.template" semantic conventions. It represents the low-cardinality |
| 9357 |
// template of an [absolute path |
| 9358 |
// reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). |
| 9359 |
func URLTemplate(val string) attribute.KeyValue { |
| 9360 |
return URLTemplateKey.String(val) |
| 9361 |
} |
| 9362 |
|
| 9363 |
// URLTopLevelDomain returns an attribute KeyValue conforming to the |
| 9364 |
// "url.top_level_domain" semantic conventions. It represents the effective top |
| 9365 |
// level domain (eTLD), also known as the domain suffix, is the last part of |
| 9366 |
// the domain name. For example, the top level domain for example.com is `com`. |
| 9367 |
func URLTopLevelDomain(val string) attribute.KeyValue { |
| 9368 |
return URLTopLevelDomainKey.String(val) |
| 9369 |
} |
| 9370 |
|
| 9371 |
// Describes user-agent attributes. |
| 9372 |
const ( |
| 9373 |
// UserAgentNameKey is the attribute Key conforming to the |
| 9374 |
// "user_agent.name" semantic conventions. It represents the name of the |
| 9375 |
// user-agent extracted from original. Usually refers to the browser's |
| 9376 |
// name. |
| 9377 |
// |
| 9378 |
// Type: string |
| 9379 |
// RequirementLevel: Optional |
| 9380 |
// Stability: experimental |
| 9381 |
// Examples: 'Safari', 'YourApp' |
| 9382 |
// Note: [Example](https://www.whatsmyua.info) of extracting browser's name |
| 9383 |
// from original string. In the case of using a user-agent for non-browser |
| 9384 |
// products, such as microservices with multiple names/versions inside the |
| 9385 |
// `user_agent.original`, the most significant name SHOULD be selected. In |
| 9386 |
// such a scenario it should align with `user_agent.version` |
| 9387 |
UserAgentNameKey = attribute.Key("user_agent.name") |
| 9388 |
|
| 9389 |
// UserAgentOriginalKey is the attribute Key conforming to the |
| 9390 |
// "user_agent.original" semantic conventions. It represents the value of |
| 9391 |
// the [HTTP |
| 9392 |
// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) |
| 9393 |
// header sent by the client. |
| 9394 |
// |
| 9395 |
// Type: string |
| 9396 |
// RequirementLevel: Optional |
| 9397 |
// Stability: stable |
| 9398 |
// Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU |
| 9399 |
// iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) |
| 9400 |
// Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 |
| 9401 |
// grpc-java-okhttp/1.27.2' |
| 9402 |
UserAgentOriginalKey = attribute.Key("user_agent.original") |
| 9403 |
|
| 9404 |
// UserAgentVersionKey is the attribute Key conforming to the |
| 9405 |
// "user_agent.version" semantic conventions. It represents the version of |
| 9406 |
// the user-agent extracted from original. Usually refers to the browser's |
| 9407 |
// version |
| 9408 |
// |
| 9409 |
// Type: string |
| 9410 |
// RequirementLevel: Optional |
| 9411 |
// Stability: experimental |
| 9412 |
// Examples: '14.1.2', '1.0.0' |
| 9413 |
// Note: [Example](https://www.whatsmyua.info) of extracting browser's |
| 9414 |
// version from original string. In the case of using a user-agent for |
| 9415 |
// non-browser products, such as microservices with multiple names/versions |
| 9416 |
// inside the `user_agent.original`, the most significant version SHOULD be |
| 9417 |
// selected. In such a scenario it should align with `user_agent.name` |
| 9418 |
UserAgentVersionKey = attribute.Key("user_agent.version") |
| 9419 |
) |
| 9420 |
|
| 9421 |
// UserAgentName returns an attribute KeyValue conforming to the |
| 9422 |
// "user_agent.name" semantic conventions. It represents the name of the |
| 9423 |
// user-agent extracted from original. Usually refers to the browser's name. |
| 9424 |
func UserAgentName(val string) attribute.KeyValue { |
| 9425 |
return UserAgentNameKey.String(val) |
| 9426 |
} |
| 9427 |
|
| 9428 |
// UserAgentOriginal returns an attribute KeyValue conforming to the |
| 9429 |
// "user_agent.original" semantic conventions. It represents the value of the |
| 9430 |
// [HTTP |
| 9431 |
// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) |
| 9432 |
// header sent by the client. |
| 9433 |
func UserAgentOriginal(val string) attribute.KeyValue { |
| 9434 |
return UserAgentOriginalKey.String(val) |
| 9435 |
} |
| 9436 |
|
| 9437 |
// UserAgentVersion returns an attribute KeyValue conforming to the |
| 9438 |
// "user_agent.version" semantic conventions. It represents the version of the |
| 9439 |
// user-agent extracted from original. Usually refers to the browser's version |
| 9440 |
func UserAgentVersion(val string) attribute.KeyValue { |
| 9441 |
return UserAgentVersionKey.String(val) |
| 9442 |
} |
| 9443 |
|
| 9444 |
// Describes information about the user. |
| 9445 |
const ( |
| 9446 |
// UserEmailKey is the attribute Key conforming to the "user.email" |
| 9447 |
// semantic conventions. It represents the user email address. |
| 9448 |
// |
| 9449 |
// Type: string |
| 9450 |
// RequirementLevel: Optional |
| 9451 |
// Stability: experimental |
| 9452 |
// Examples: '[email protected]' |
| 9453 |
UserEmailKey = attribute.Key("user.email") |
| 9454 |
|
| 9455 |
// UserFullNameKey is the attribute Key conforming to the "user.full_name" |
| 9456 |
// semantic conventions. It represents the user's full name |
| 9457 |
// |
| 9458 |
// Type: string |
| 9459 |
// RequirementLevel: Optional |
| 9460 |
// Stability: experimental |
| 9461 |
// Examples: 'Albert Einstein' |
| 9462 |
UserFullNameKey = attribute.Key("user.full_name") |
| 9463 |
|
| 9464 |
// UserHashKey is the attribute Key conforming to the "user.hash" semantic |
| 9465 |
// conventions. It represents the unique user hash to correlate information |
| 9466 |
// for a user in anonymized form. |
| 9467 |
// |
| 9468 |
// Type: string |
| 9469 |
// RequirementLevel: Optional |
| 9470 |
// Stability: experimental |
| 9471 |
// Examples: '364fc68eaf4c8acec74a4e52d7d1feaa' |
| 9472 |
// Note: Useful if `user.id` or `user.name` contain confidential |
| 9473 |
// information and cannot be used. |
| 9474 |
UserHashKey = attribute.Key("user.hash") |
| 9475 |
|
| 9476 |
// UserIDKey is the attribute Key conforming to the "user.id" semantic |
| 9477 |
// conventions. It represents the unique identifier of the user. |
| 9478 |
// |
| 9479 |
// Type: string |
| 9480 |
// RequirementLevel: Optional |
| 9481 |
// Stability: experimental |
| 9482 |
// Examples: 'S-1-5-21-202424912787-2692429404-2351956786-1000' |
| 9483 |
UserIDKey = attribute.Key("user.id") |
| 9484 |
|
| 9485 |
// UserNameKey is the attribute Key conforming to the "user.name" semantic |
| 9486 |
// conventions. It represents the short name or login/username of the user. |
| 9487 |
// |
| 9488 |
// Type: string |
| 9489 |
// RequirementLevel: Optional |
| 9490 |
// Stability: experimental |
| 9491 |
// Examples: 'a.einstein' |
| 9492 |
UserNameKey = attribute.Key("user.name") |
| 9493 |
|
| 9494 |
// UserRolesKey is the attribute Key conforming to the "user.roles" |
| 9495 |
// semantic conventions. It represents the array of user roles at the time |
| 9496 |
// of the event. |
| 9497 |
// |
| 9498 |
// Type: string[] |
| 9499 |
// RequirementLevel: Optional |
| 9500 |
// Stability: experimental |
| 9501 |
// Examples: 'admin', 'reporting_user' |
| 9502 |
UserRolesKey = attribute.Key("user.roles") |
| 9503 |
) |
| 9504 |
|
| 9505 |
// UserEmail returns an attribute KeyValue conforming to the "user.email" |
| 9506 |
// semantic conventions. It represents the user email address. |
| 9507 |
func UserEmail(val string) attribute.KeyValue { |
| 9508 |
return UserEmailKey.String(val) |
| 9509 |
} |
| 9510 |
|
| 9511 |
// UserFullName returns an attribute KeyValue conforming to the |
| 9512 |
// "user.full_name" semantic conventions. It represents the user's full name |
| 9513 |
func UserFullName(val string) attribute.KeyValue { |
| 9514 |
return UserFullNameKey.String(val) |
| 9515 |
} |
| 9516 |
|
| 9517 |
// UserHash returns an attribute KeyValue conforming to the "user.hash" |
| 9518 |
// semantic conventions. It represents the unique user hash to correlate |
| 9519 |
// information for a user in anonymized form. |
| 9520 |
func UserHash(val string) attribute.KeyValue { |
| 9521 |
return UserHashKey.String(val) |
| 9522 |
} |
| 9523 |
|
| 9524 |
// UserID returns an attribute KeyValue conforming to the "user.id" semantic |
| 9525 |
// conventions. It represents the unique identifier of the user. |
| 9526 |
func UserID(val string) attribute.KeyValue { |
| 9527 |
return UserIDKey.String(val) |
| 9528 |
} |
| 9529 |
|
| 9530 |
// UserName returns an attribute KeyValue conforming to the "user.name" |
| 9531 |
// semantic conventions. It represents the short name or login/username of the |
| 9532 |
// user. |
| 9533 |
func UserName(val string) attribute.KeyValue { |
| 9534 |
return UserNameKey.String(val) |
| 9535 |
} |
| 9536 |
|
| 9537 |
// UserRoles returns an attribute KeyValue conforming to the "user.roles" |
| 9538 |
// semantic conventions. It represents the array of user roles at the time of |
| 9539 |
// the event. |
| 9540 |
func UserRoles(val ...string) attribute.KeyValue { |
| 9541 |
return UserRolesKey.StringSlice(val) |
| 9542 |
} |
| 9543 |
|
| 9544 |
// Describes V8 JS Engine Runtime related attributes. |
| 9545 |
const ( |
| 9546 |
// V8JSGCTypeKey is the attribute Key conforming to the "v8js.gc.type" |
| 9547 |
// semantic conventions. It represents the type of garbage collection. |
| 9548 |
// |
| 9549 |
// Type: Enum |
| 9550 |
// RequirementLevel: Optional |
| 9551 |
// Stability: experimental |
| 9552 |
V8JSGCTypeKey = attribute.Key("v8js.gc.type") |
| 9553 |
|
| 9554 |
// V8JSHeapSpaceNameKey is the attribute Key conforming to the |
| 9555 |
// "v8js.heap.space.name" semantic conventions. It represents the name of |
| 9556 |
// the space type of heap memory. |
| 9557 |
// |
| 9558 |
// Type: Enum |
| 9559 |
// RequirementLevel: Optional |
| 9560 |
// Stability: experimental |
| 9561 |
// Note: Value can be retrieved from value `space_name` of |
| 9562 |
// [`v8.getHeapSpaceStatistics()`](https://nodejs.org/api/v8.html#v8getheapspacestatistics) |
| 9563 |
V8JSHeapSpaceNameKey = attribute.Key("v8js.heap.space.name") |
| 9564 |
) |
| 9565 |
|
| 9566 |
var ( |
| 9567 |
// Major (Mark Sweep Compact) |
| 9568 |
V8JSGCTypeMajor = V8JSGCTypeKey.String("major") |
| 9569 |
// Minor (Scavenge) |
| 9570 |
V8JSGCTypeMinor = V8JSGCTypeKey.String("minor") |
| 9571 |
// Incremental (Incremental Marking) |
| 9572 |
V8JSGCTypeIncremental = V8JSGCTypeKey.String("incremental") |
| 9573 |
// Weak Callbacks (Process Weak Callbacks) |
| 9574 |
V8JSGCTypeWeakcb = V8JSGCTypeKey.String("weakcb") |
| 9575 |
) |
| 9576 |
|
| 9577 |
var ( |
| 9578 |
// New memory space |
| 9579 |
V8JSHeapSpaceNameNewSpace = V8JSHeapSpaceNameKey.String("new_space") |
| 9580 |
// Old memory space |
| 9581 |
V8JSHeapSpaceNameOldSpace = V8JSHeapSpaceNameKey.String("old_space") |
| 9582 |
// Code memory space |
| 9583 |
V8JSHeapSpaceNameCodeSpace = V8JSHeapSpaceNameKey.String("code_space") |
| 9584 |
// Map memory space |
| 9585 |
V8JSHeapSpaceNameMapSpace = V8JSHeapSpaceNameKey.String("map_space") |
| 9586 |
// Large object memory space |
| 9587 |
V8JSHeapSpaceNameLargeObjectSpace = V8JSHeapSpaceNameKey.String("large_object_space") |
| 9588 |
) |
| 9589 |
|
| 9590 |
// This group defines the attributes for [Version Control Systems |
| 9591 |
// (VCS)](https://en.wikipedia.org/wiki/Version_control). |
| 9592 |
const ( |
| 9593 |
// VCSRepositoryChangeIDKey is the attribute Key conforming to the |
| 9594 |
// "vcs.repository.change.id" semantic conventions. It represents the ID of |
| 9595 |
// the change (pull request/merge request) if applicable. This is usually a |
| 9596 |
// unique (within repository) identifier generated by the VCS system. |
| 9597 |
// |
| 9598 |
// Type: string |
| 9599 |
// RequirementLevel: Optional |
| 9600 |
// Stability: experimental |
| 9601 |
// Examples: '123' |
| 9602 |
VCSRepositoryChangeIDKey = attribute.Key("vcs.repository.change.id") |
| 9603 |
|
| 9604 |
// VCSRepositoryChangeTitleKey is the attribute Key conforming to the |
| 9605 |
// "vcs.repository.change.title" semantic conventions. It represents the |
| 9606 |
// human readable title of the change (pull request/merge request). This |
| 9607 |
// title is often a brief summary of the change and may get merged in to a |
| 9608 |
// ref as the commit summary. |
| 9609 |
// |
| 9610 |
// Type: string |
| 9611 |
// RequirementLevel: Optional |
| 9612 |
// Stability: experimental |
| 9613 |
// Examples: 'Fixes broken thing', 'feat: add my new feature', '[chore] |
| 9614 |
// update dependency' |
| 9615 |
VCSRepositoryChangeTitleKey = attribute.Key("vcs.repository.change.title") |
| 9616 |
|
| 9617 |
// VCSRepositoryRefNameKey is the attribute Key conforming to the |
| 9618 |
// "vcs.repository.ref.name" semantic conventions. It represents the name |
| 9619 |
// of the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as |
| 9620 |
// **branch** or **tag** in the repository. |
| 9621 |
// |
| 9622 |
// Type: string |
| 9623 |
// RequirementLevel: Optional |
| 9624 |
// Stability: experimental |
| 9625 |
// Examples: 'my-feature-branch', 'tag-1-test' |
| 9626 |
VCSRepositoryRefNameKey = attribute.Key("vcs.repository.ref.name") |
| 9627 |
|
| 9628 |
// VCSRepositoryRefRevisionKey is the attribute Key conforming to the |
| 9629 |
// "vcs.repository.ref.revision" semantic conventions. It represents the |
| 9630 |
// revision, literally [revised |
| 9631 |
// version](https://www.merriam-webster.com/dictionary/revision), The |
| 9632 |
// revision most often refers to a commit object in Git, or a revision |
| 9633 |
// number in SVN. |
| 9634 |
// |
| 9635 |
// Type: string |
| 9636 |
// RequirementLevel: Optional |
| 9637 |
// Stability: experimental |
| 9638 |
// Examples: |
| 9639 |
// '9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc', |
| 9640 |
// 'main', '123', 'HEAD' |
| 9641 |
// Note: The revision can be a full [hash value (see |
| 9642 |
// glossary)](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf), |
| 9643 |
// of the recorded change to a ref within a repository pointing to a |
| 9644 |
// commit [commit](https://git-scm.com/docs/git-commit) object. It does |
| 9645 |
// not necessarily have to be a hash; it can simply define a |
| 9646 |
// [revision |
| 9647 |
// number](https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html) |
| 9648 |
// which is an integer that is monotonically increasing. In cases where |
| 9649 |
// it is identical to the `ref.name`, it SHOULD still be included. It is |
| 9650 |
// up to the implementer to decide which value to set as the revision |
| 9651 |
// based on the VCS system and situational context. |
| 9652 |
VCSRepositoryRefRevisionKey = attribute.Key("vcs.repository.ref.revision") |
| 9653 |
|
| 9654 |
// VCSRepositoryRefTypeKey is the attribute Key conforming to the |
| 9655 |
// "vcs.repository.ref.type" semantic conventions. It represents the type |
| 9656 |
// of the [reference](https://git-scm.com/docs/gitglossary#def_ref) in the |
| 9657 |
// repository. |
| 9658 |
// |
| 9659 |
// Type: Enum |
| 9660 |
// RequirementLevel: Optional |
| 9661 |
// Stability: experimental |
| 9662 |
// Examples: 'branch', 'tag' |
| 9663 |
VCSRepositoryRefTypeKey = attribute.Key("vcs.repository.ref.type") |
| 9664 |
|
| 9665 |
// VCSRepositoryURLFullKey is the attribute Key conforming to the |
| 9666 |
// "vcs.repository.url.full" semantic conventions. It represents the |
| 9667 |
// [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the |
| 9668 |
// complete address in order to locate and identify the repository. |
| 9669 |
// |
| 9670 |
// Type: string |
| 9671 |
// RequirementLevel: Optional |
| 9672 |
// Stability: experimental |
| 9673 |
// Examples: |
| 9674 |
// 'https://github.com/opentelemetry/open-telemetry-collector-contrib', |
| 9675 |
// 'https://gitlab.com/my-org/my-project/my-projects-project/repo' |
| 9676 |
VCSRepositoryURLFullKey = attribute.Key("vcs.repository.url.full") |
| 9677 |
) |
| 9678 |
|
| 9679 |
var ( |
| 9680 |
// [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) |
| 9681 |
VCSRepositoryRefTypeBranch = VCSRepositoryRefTypeKey.String("branch") |
| 9682 |
// [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) |
| 9683 |
VCSRepositoryRefTypeTag = VCSRepositoryRefTypeKey.String("tag") |
| 9684 |
) |
| 9685 |
|
| 9686 |
// VCSRepositoryChangeID returns an attribute KeyValue conforming to the |
| 9687 |
// "vcs.repository.change.id" semantic conventions. It represents the ID of the |
| 9688 |
// change (pull request/merge request) if applicable. This is usually a unique |
| 9689 |
// (within repository) identifier generated by the VCS system. |
| 9690 |
func VCSRepositoryChangeID(val string) attribute.KeyValue { |
| 9691 |
return VCSRepositoryChangeIDKey.String(val) |
| 9692 |
} |
| 9693 |
|
| 9694 |
// VCSRepositoryChangeTitle returns an attribute KeyValue conforming to the |
| 9695 |
// "vcs.repository.change.title" semantic conventions. It represents the human |
| 9696 |
// readable title of the change (pull request/merge request). This title is |
| 9697 |
// often a brief summary of the change and may get merged in to a ref as the |
| 9698 |
// commit summary. |
| 9699 |
func VCSRepositoryChangeTitle(val string) attribute.KeyValue { |
| 9700 |
return VCSRepositoryChangeTitleKey.String(val) |
| 9701 |
} |
| 9702 |
|
| 9703 |
// VCSRepositoryRefName returns an attribute KeyValue conforming to the |
| 9704 |
// "vcs.repository.ref.name" semantic conventions. It represents the name of |
| 9705 |
// the [reference](https://git-scm.com/docs/gitglossary#def_ref) such as |
| 9706 |
// **branch** or **tag** in the repository. |
| 9707 |
func VCSRepositoryRefName(val string) attribute.KeyValue { |
| 9708 |
return VCSRepositoryRefNameKey.String(val) |
| 9709 |
} |
| 9710 |
|
| 9711 |
// VCSRepositoryRefRevision returns an attribute KeyValue conforming to the |
| 9712 |
// "vcs.repository.ref.revision" semantic conventions. It represents the |
| 9713 |
// revision, literally [revised |
| 9714 |
// version](https://www.merriam-webster.com/dictionary/revision), The revision |
| 9715 |
// most often refers to a commit object in Git, or a revision number in SVN. |
| 9716 |
func VCSRepositoryRefRevision(val string) attribute.KeyValue { |
| 9717 |
return VCSRepositoryRefRevisionKey.String(val) |
| 9718 |
} |
| 9719 |
|
| 9720 |
// VCSRepositoryURLFull returns an attribute KeyValue conforming to the |
| 9721 |
// "vcs.repository.url.full" semantic conventions. It represents the |
| 9722 |
// [URL](https://en.wikipedia.org/wiki/URL) of the repository providing the |
| 9723 |
// complete address in order to locate and identify the repository. |
| 9724 |
func VCSRepositoryURLFull(val string) attribute.KeyValue { |
| 9725 |
return VCSRepositoryURLFullKey.String(val) |
| 9726 |
} |
| 9727 |
|
| 9728 |
// The attributes used to describe the packaged software running the |
| 9729 |
// application code. |
| 9730 |
const ( |
| 9731 |
// WebEngineDescriptionKey is the attribute Key conforming to the |
| 9732 |
// "webengine.description" semantic conventions. It represents the |
| 9733 |
// additional description of the web engine (e.g. detailed version and |
| 9734 |
// edition information). |
| 9735 |
// |
| 9736 |
// Type: string |
| 9737 |
// RequirementLevel: Optional |
| 9738 |
// Stability: experimental |
| 9739 |
// Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - |
| 9740 |
// 2.2.2.Final' |
| 9741 |
WebEngineDescriptionKey = attribute.Key("webengine.description") |
| 9742 |
|
| 9743 |
// WebEngineNameKey is the attribute Key conforming to the "webengine.name" |
| 9744 |
// semantic conventions. It represents the name of the web engine. |
| 9745 |
// |
| 9746 |
// Type: string |
| 9747 |
// RequirementLevel: Optional |
| 9748 |
// Stability: experimental |
| 9749 |
// Examples: 'WildFly' |
| 9750 |
WebEngineNameKey = attribute.Key("webengine.name") |
| 9751 |
|
| 9752 |
// WebEngineVersionKey is the attribute Key conforming to the |
| 9753 |
// "webengine.version" semantic conventions. It represents the version of |
| 9754 |
// the web engine. |
| 9755 |
// |
| 9756 |
// Type: string |
| 9757 |
// RequirementLevel: Optional |
| 9758 |
// Stability: experimental |
| 9759 |
// Examples: '21.0.0' |
| 9760 |
WebEngineVersionKey = attribute.Key("webengine.version") |
| 9761 |
) |
| 9762 |
|
| 9763 |
// WebEngineDescription returns an attribute KeyValue conforming to the |
| 9764 |
// "webengine.description" semantic conventions. It represents the additional |
| 9765 |
// description of the web engine (e.g. detailed version and edition |
| 9766 |
// information). |
| 9767 |
func WebEngineDescription(val string) attribute.KeyValue { |
| 9768 |
return WebEngineDescriptionKey.String(val) |
| 9769 |
} |
| 9770 |
|
| 9771 |
// WebEngineName returns an attribute KeyValue conforming to the |
| 9772 |
// "webengine.name" semantic conventions. It represents the name of the web |
| 9773 |
// engine. |
| 9774 |
func WebEngineName(val string) attribute.KeyValue { |
| 9775 |
return WebEngineNameKey.String(val) |
| 9776 |
} |
| 9777 |
|
| 9778 |
// WebEngineVersion returns an attribute KeyValue conforming to the |
| 9779 |
// "webengine.version" semantic conventions. It represents the version of the |
| 9780 |
// web engine. |
| 9781 |
func WebEngineVersion(val string) attribute.KeyValue { |
| 9782 |
return WebEngineVersionKey.String(val) |
| 9783 |
} |