# Semantic conventions for Azure resource log events

LLMS index: [llms.txt](/llms.txt)

---

**Status**: [Development][DocumentStatus]

This document defines semantic conventions for instrumentations that emit Azure
Resource Log events.

## Azure Resource Log

<!-- semconv event.azure.resource.log -->
<!-- NOTE: THIS TEXT IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/snippet.md.j2 -->
<!-- prettier-ignore-start -->

**Status:** ![Development](https://img.shields.io/badge/-development-blue)

The event name MUST be `azure.resource.log`.

Describes Azure Resource Log event, see [Azure Resource Log Top-level Schema](https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema) for more details.

**Attributes:**

| Key | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| [`azure.service.request.id`](/docs/specs/semconv/registry/attributes/azure.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The unique identifier of the service request. It's generated by the Azure service and returned with the response. | `00000000-0000-0000-0000-000000000000` |
| [`cloud.resource_id`](/docs/specs/semconv/registry/attributes/cloud.md) | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The [Fully Qualified Azure Resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) the log is emitted for. | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions/<SUBSCRIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>` |

**Body fields:**

:warning: Body fields will be moved to complex attributes once the
semantic convention tooling supports complex attributes
(see [#1870](https://github.com/open-telemetry/semantic-conventions/issues/1870)).

| Field Name | Stability | [Requirement Level](/docs/specs/semconv/general/attribute-requirement-level/) | Value Type | Description | Example Values |
| --- | --- | --- | --- | --- | --- |
| `category` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The Azure category of the log entry. | `AuditEvent`; `GatewayLogs`; `ApplicationGatewayAccessLog` |
| `correlation.id` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The correlation ID of the log entry. | `607964b6-41a5-4e24-a5db-db7aab3b9b34` |
| `duration` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | int | The duration of the operations in milliseconds. | `1000` |
| `identity` | ![Development](https://img.shields.io/badge/-development-blue) | `Opt-In` | undefined | "A JSON blob that describes the identity of the user or application that performed the operation." [1] | |
| `operation.name` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The name of the operation. | `SecretGet`; `Microsoft.ApiManagement/GatewayLogs`; `ApplicationGatewayAccess` |
| `operation.version` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The version of the operation. | `1.0` |
| `properties` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | undefined | The properties provided in the Azure Resource Log. | |
| `result.description` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The description of the result. | `The operation was successful`; `The operation failed` |
| `result.signature` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The substatus of associated with the logged event. | `OK` |
| `result.type` | ![Development](https://img.shields.io/badge/-development-blue) | `Recommended` | string | The status associated with the logged event. | `Succeeded`; `Failed`; `Started` |
| `tenant.id` | ![Development](https://img.shields.io/badge/-development-blue) | `Conditionally Required` [2] | string | The tenant ID of the Active Directory tenant that this event is tied to. | `00000000-0000-0000-0000-000000000000` |

**[1]:** Typically, this field includes the authorization and claims or JWT token from Active Directory.

> [!Warning]
> This field contains sensitive (PII) information.

**[2] `tenant.id`:** if the event is tied to an Active Directory tenant.

<!-- prettier-ignore-end -->
<!-- END AUTOGENERATED TEXT -->
<!-- endsemconv -->

[DocumentStatus]: /docs/specs/otel/document-status
