|
| 1 | +# Version: 0.0.0 |
| 2 | +# Status: Experimental |
| 3 | +# This document describes Azure SDK trace semantic conventions. For more details refer to https://azure.github.io/azure-sdk/distributed_tracing_conventions.html |
| 4 | + |
| 5 | +groups: |
| 6 | + # common |
| 7 | + - id: azure-sdk |
| 8 | + brief: 'Describes Azure SDK spans.' |
| 9 | + attributes: |
| 10 | + - id: az.namespace |
| 11 | + required: always |
| 12 | + type: string |
| 13 | + brief: '[Namespace](https://docs.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) of Azure service request is made against.' |
| 14 | + examples: ['Microsoft.Storage', 'Microsoft.KeyVault', 'Microsoft.ServiceBus'] |
| 15 | + |
| 16 | + # public API |
| 17 | + - id: azure-sdk.api |
| 18 | + span_kind: internal |
| 19 | + extends: azure-sdk |
| 20 | + brief: 'Describes Azure SDK API calls spans.' |
| 21 | + note: 'Represents public surface API calls that wrap an Azure service call.' |
| 22 | + |
| 23 | + # http |
| 24 | + - id: azure-sdk.http |
| 25 | + extends: azure-sdk |
| 26 | + span_kind: client |
| 27 | + brief: 'Describes HTTP client spans created per HTTP request (try).' |
| 28 | + note: > |
| 29 | + Follows [OpenTelemetry HTTP conventions v1.6.x](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.x/specification/trace/semantic_conventions/http.md) |
| 30 | + but omits all optional attributes, providing only `http.url` to describe destination. It adds request-id attributes supported by Azure services. |
| 31 | + attributes: |
| 32 | + - id: request_id |
| 33 | + type: string |
| 34 | + required: always |
| 35 | + brief: 'Value of the [x-ms-client-request-id] header (or other request-id header, depending on the service) sent by the client.' |
| 36 | + examples: ['eb178587-c05a-418c-a695-ae9466c5303c'] |
| 37 | + - id: service_request_id |
| 38 | + type: string |
| 39 | + required: always |
| 40 | + brief: 'Value of the [x-ms-request-id] header (or other request-id header, depending on the service) sent by the server in response.' |
| 41 | + examples: ['3f828ae5-ecb9-40ab-88d9-db0420af30c6'] |
| 42 | + - id: http.method |
| 43 | + type: string |
| 44 | + required: always |
| 45 | + sampling_relevant: true |
| 46 | + brief: 'HTTP request method.' |
| 47 | + examples: ["GET", "POST", "HEAD"] |
| 48 | + - id: http.url |
| 49 | + type: string |
| 50 | + required: always |
| 51 | + sampling_relevant: true |
| 52 | + brief: Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]` |
| 53 | + examples: ['https://www.foo.bar/search?q=OpenTelemetry#SemConv'] |
| 54 | + - id: http.status_code |
| 55 | + type: int |
| 56 | + required: |
| 57 | + conditional: If and only if one was received/sent. |
| 58 | + brief: '[HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).' |
| 59 | + examples: [200] |
| 60 | + - id: http.user_agent |
| 61 | + type: string |
| 62 | + required: always |
| 63 | + brief: 'Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) or X-MS-UserAgent header sent by the client.' |
| 64 | + examples: ['CERN-LineMode/2.15 libwww/2.17b3'] |
| 65 | + |
| 66 | + # messaging |
| 67 | + - id: azure-sdk.messaging |
| 68 | + brief: 'Describes Azure messaging SDKs spans.' |
| 69 | + extends: azure-sdk |
| 70 | + note: Implements OpenTracing MessageBus conventions https://opentracing.io/specification/conventions/ |
| 71 | + attributes: |
| 72 | + - id: message_bus.destination |
| 73 | + type: string |
| 74 | + required: always |
| 75 | + brief: 'Name of the messaging entity within namespace: e.g EventHubs name, ServiceBus queue or topic name.' |
| 76 | + examples: ['myqueue', 'myhub'] |
| 77 | + - id: peer.address |
| 78 | + type: string |
| 79 | + brief: 'Fully qualified messaging service name.' |
| 80 | + required: always |
| 81 | + examples: ['myEventHubNamespace.servicebus.windows.net'] |
| 82 | + - id: azure-sdk.messaging.producer |
| 83 | + span_kind: producer |
| 84 | + extends: azure-sdk.messaging |
| 85 | + brief: 'Describes producer span created per event.' |
| 86 | + |
| 87 | + - id: azure-sdk.messaging.send |
| 88 | + span_kind: client |
| 89 | + extends: azure-sdk.messaging |
| 90 | + brief: 'Describes send (transport call) span.' |
| 91 | + note: 'Contains links to all messages contexts being sent.' |
| 92 | + |
| 93 | + - id: azure-sdk.messaging.process |
| 94 | + span_kind: consumer |
| 95 | + extends: azure-sdk.messaging |
| 96 | + brief: 'Describes consumption span.' |
| 97 | + note: > |
| 98 | + Contains links to all messages contexts being consumed. Each link has attribute `enqueuedTime` (with `long` type) |
| 99 | + attribute with unix epoch time with milliseconds precision representing when message was enqueued. |
| 100 | +
|
| 101 | + # CosmosDB |
| 102 | + - id: azure-sdk.cosmos |
| 103 | + span_kind: client |
| 104 | + brief: 'Describes Azure CosmosDB spans.' |
| 105 | + note: > |
| 106 | + Events with additional debug info are added for long running operations. |
| 107 | + Implements https://github.com/open-telemetry/opentelemetry-specification/blob/v0.5.0/specification/trace/semantic_conventions/database.md |
| 108 | + extends: azure-sdk |
| 109 | + attributes: |
| 110 | + - id: db.url |
| 111 | + type: string |
| 112 | + required: always |
| 113 | + brief: 'Cosmos DB URI' |
| 114 | + examples: ['https://my-cosmos.documents.azure.com:443/'] |
| 115 | + - id: db.statement |
| 116 | + type: string |
| 117 | + required: always |
| 118 | + brief: 'Database statement' |
| 119 | + examples: ['createContainerIfNotExists.myContainer'] |
| 120 | + - id: db.instance |
| 121 | + type: string |
| 122 | + required: always |
| 123 | + brief: 'Database name' |
| 124 | + examples: ['mydb'] |
| 125 | + - id: db.type |
| 126 | + type: string |
| 127 | + required: always |
| 128 | + brief: 'Database type' |
| 129 | + examples: ['Cosmos'] |
0 commit comments