semantic-conventions
semantic-conventions copied to clipboard
add Azure resource log mapping to OpenTelemetry
trafficstars
What are you trying to achieve?
A mapping between the Azure top-level common schema for resource logs and OpenTelemetry was implemented in the Azure Event Hub receiver. During the review of the pull request (issue), the maintainers requested that the mapping be added to Appendix A of the logs data model.
Additional context.
For convenience, the proposed table is below.
| Field | Type | Description | Maps to Unified Model Field |
|---|---|---|---|
| callerIpAddress | string | The caller IP address, if the operation corresponds to an API call that would come from an entity with a publicly available IP address. | Attributes["net.sock.peer.addr"] |
| correlationId | string | A GUID that's used to group together a set of related events. Typically, if two events have the same operationName value but two different statuses (for example, Started and Succeeded), they share the same correlationID value. This might also represent other relationships between events. | Attribute["azure.correlation.id"] |
| category | string | The log category of the event. Category is the granularity at which you can enable or disable logs on a particular resource. The properties that appear within the properties blob of an event are the same within a particular log category and resource type. Typical log categories are Audit, Operational, Execution, and Request. | Attributes["azure.category"] |
| durationMs | string | The duration of the operation in milliseconds. | Attributes["azure.duration"] |
| Level | string | The severity level of the event. Must be one of Informational, Warning, Error, or Critical. | fields["severity_number"], fields["severity_text"] |
| location | string | The region of the resource emitting the event; for example, East US or France South. | Attributes["cloud.region"] |
| operationName | string | The name of the operation that this event represents. If the event represents an Azure role-based access control (RBAC) operation, this is the Azure RBAC operation name (for example, Microsoft.Storage/storageAccounts/blobServices/blobs/Read). This name is typically modeled in the form of an Azure Resource Manager operation, even if it's not a documented Resource Manager operation: (Microsoft.{providerName}/{resourceType}/{subtype}/{Write|Read|Delete|Action}). | Attributes["azure.operation.name"] |
| operationVersion | string | The API version associated with the operation, if operationName was performed through an API (for example, http://myservice.windowsazure.net/object?api-version=2016-06-01). If no API corresponds to this operation, the version represents the version of that operation in case the properties associated with the operation change in the future. | Attributes["azure.operation.version"] |
| properties | map | Any extended properties related to this category of events. All custom or unique properties must be put inside this "Part B" of the schema. | Attributes["azure.properties"] |
| resourceId | string | The resource ID of the resource that emitted the event. For tenant services, this is of the form /tenants/tenant-id/providers/provider-name. | Resource["azure.resource.id"] |
| resultDescription | string | The static text description of this operation; for example, Get storage file. | Attributes["azure.result.description"] |
| resultSignature | string | The substatus of the event. If this operation corresponds to a REST API call, this field is the HTTP status code of the corresponding REST call. | Attributes["azure.result.signature"] |
| resultType | string | The status of the event. Typical values include Started, In Progress, Succeeded, Failed, Active, and Resolved. | Attributes["azure.result.type"] |
| tenantId | string | The tenant ID of the Active Directory tenant that this event is tied to. This property is used only for tenant-level logs. It does not appear in resource-level logs. | Attributes["azure.tenant.id"] |
| time | string | The timestamp (UTC) of the event. | fields["time_unix_nano"] |
| identity | map | A JSON blob that describes the identity of the user or application that performed the operation. Typically, this field includes the authorization and claims or JWT token from Active Directory. | Attributes["azure.identity"] |
@loomis-relativity, Azure resource logs are being defined in #1028, please take a look if you're still interested.