Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Azure SDK attributes & Logs events #1028

Merged
merged 55 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6f8cb8d
initial commit of azure logs
MikeGoldsmith May 10, 2024
dd39959
rename changelog component name
MikeGoldsmith May 14, 2024
c89010c
fix changelog formatting
MikeGoldsmith May 14, 2024
b67f638
ran attribute-registry-generation
MikeGoldsmith May 14, 2024
bece58b
add azure SDK component
MikeGoldsmith May 14, 2024
6e65376
update issue templates
MikeGoldsmith May 14, 2024
c9ef4e2
combine az and azure
MikeGoldsmith May 14, 2024
c3dc90d
remove az.md
MikeGoldsmith May 14, 2024
dc149f6
move sdk and logs into sub-groups
MikeGoldsmith May 14, 2024
ea104de
run attribute-registry-generation
MikeGoldsmith May 14, 2024
3f8d012
upate azure prefix to az.log
MikeGoldsmith May 29, 2024
dae49f2
Apply suggestions from code review
MikeGoldsmith May 29, 2024
9711463
Apply suggestions from code review
MikeGoldsmith May 29, 2024
88ec9c9
update result.type examples to match docs
MikeGoldsmith May 29, 2024
5c64673
Apply suggestions from code review
MikeGoldsmith May 29, 2024
f15f90c
Merge branch 'mike/azure-logs' of github.com:MikeGoldsmith/semantic-c…
MikeGoldsmith May 29, 2024
6a72d53
update identity field desc to note PII
MikeGoldsmith May 29, 2024
e3abdce
regenerate markdown files
MikeGoldsmith May 29, 2024
5ecf2b9
fix typo
MikeGoldsmith May 29, 2024
28345ef
Merge branch 'main' of github.com:open-telemetry/semantic-conventions…
MikeGoldsmith May 29, 2024
bd38a94
Merge branch 'main' into mike/azure-logs
MikeGoldsmith May 30, 2024
5d505c4
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jun 11, 2024
069d7d7
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 1, 2024
8466965
add event.name and move other attrs to body
MikeGoldsmith Jul 3, 2024
7ab29f1
tweak changelog description
MikeGoldsmith Jul 3, 2024
31796de
clean up event name
MikeGoldsmith Jul 3, 2024
a6dec26
update changelog description
MikeGoldsmith Jul 3, 2024
04b1006
remove local asdf file
MikeGoldsmith Jul 3, 2024
a8c2c02
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 4, 2024
3a9ffd7
Apply suggestions from code review
MikeGoldsmith Jul 17, 2024
4b04ce2
move event to model/logs/azure
MikeGoldsmith Jul 17, 2024
558f302
remove additional resource.id field
MikeGoldsmith Jul 17, 2024
8c23e95
rename property to properties and examples
MikeGoldsmith Jul 17, 2024
57ad794
add missing groups to top of logs model
MikeGoldsmith Jul 17, 2024
5e5b5d0
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 17, 2024
99134cb
run make target to regenerate markdown files
MikeGoldsmith Jul 17, 2024
25266ff
fix lint errors
MikeGoldsmith Jul 17, 2024
5afab2a
fix typo
MikeGoldsmith Jul 17, 2024
6a01867
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 18, 2024
a0d61e4
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 22, 2024
21276eb
Apply suggestions from code review
MikeGoldsmith Jul 25, 2024
bacb535
update service_request_id description
MikeGoldsmith Jul 25, 2024
7a9d4fe
add markdown docs markdown files
MikeGoldsmith Jul 25, 2024
3c6c1cc
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 25, 2024
9d4f31c
fix lint errors
MikeGoldsmith Jul 25, 2024
488c22d
indent comment in model/logs/azure.yaml
MikeGoldsmith Jul 26, 2024
3b1dd09
use keyvaluelist for properties
MikeGoldsmith Jul 26, 2024
1b0d41b
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 29, 2024
0c98f83
use autogeneration tools to build attributes table
MikeGoldsmith Jul 29, 2024
e02f1e0
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 29, 2024
5d717d0
Apply suggestions from code review
MikeGoldsmith Jul 30, 2024
f859c88
Merge branch 'main' into mike/azure-logs
MikeGoldsmith Jul 30, 2024
55b9b6e
fix yaml lint errors
MikeGoldsmith Jul 30, 2024
4b63a1d
regenerated attributes table
MikeGoldsmith Jul 30, 2024
75c29c2
Merge branch 'main' into mike/azure-logs
lmolkova Aug 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/add-azure-logs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: new_component

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: azure

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add Azure SDK attributes & Logs event semantic conventions

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
issues: [1027]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ body:
- area:artifact
- area:aspnetcore
- area:aws
- area:azure
- area:browser
- area:cicd
- area:client
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change_proposal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ body:
- area:artifact
- area:aspnetcore
- area:aws
- area:azure
- area:browser
- area:cicd
- area:client
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ body:
- area:artifact
- area:aspnetcore
- area:aws
- area:azure
- area:browser
- area:cicd
- area:client
Expand Down
1 change: 1 addition & 0 deletions docs/attributes-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Currently, the following namespaces exist:
- [Artifact](artifact.md)
- [Aspnetcore](aspnetcore.md)
- [AWS](aws.md)
- [Azure](azure.md)
- [Browser](browser.md)
- [CICD](cicd.md)
- [Client](client.md)
Expand Down
15 changes: 15 additions & 0 deletions docs/attributes-registry/azure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--- Hugo front matter used to generate the website version of this page:
--->

<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->

# Azure

## Azure Sdk Attributes

This document defines generic attributes for Azure SDK.

| Attribute | Type | Description | Examples | Stability |
| ----------------------- | ------ | ----------------------------------------------------------------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------- |
| `az.service_request_id` | 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` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
19 changes: 19 additions & 0 deletions docs/azure/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Azure
path_base_for_github_subdir:
from: tmp/semconv/docs/azure/_index.md
to: azure/README.md
--->

# Semantic Convention for Azure Resource Logs

**Status**: [Experimental][DocumentStatus]

This document describes Azure Resource Logs, see [Azure Resource Log Top-level Schema][AzureResourceSchema].

Semantic conventions are defined for the following signals:

* [Events](events.md)

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
[AzureResourceSchema]: https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema
44 changes: 44 additions & 0 deletions docs/azure/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Semantic Conventions for Azure Resource Log events

**Status**: [Experimental][DocumentStatus]

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

## Azure Resource Log

### Event details

The event name MUST be `az.resource.log` in the `event.name` property.

### Attributes

<!-- manually added table until body fields can be autogenerated -->
MikeGoldsmith marked this conversation as resolved.
Show resolved Hide resolved
| Attribute | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| [`event.name`](/docs/attributes-registry/event.md) | string | Identifies the class / type of event. [1] | `az.resource.log` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`az.service_request_id`](/docs/attributes-registry/azure.md) | 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` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| [`cloud.resource_id`](/docs/attributes-registry/cloud.md) | string | Cloud provider-specific native identifier of the monitored cloud resource (e.g. an [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) on AWS, a [fully qualified resource ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on Azure, a [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) on GCP) [4] | `arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function`; `//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID`; `/subscriptions/<SUBSCIPTION_GUID>/resourceGroups/<RG>/providers/Microsoft.Web/sites/<FUNCAPP>/functions/<FUNC>` | `Recommended` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- end of manually added table -->

### Body Fields

<!-- manually added table until body fields can be autogenerated -->
lmolkova marked this conversation as resolved.
Show resolved Hide resolved
| Body Field | Type | Description | Examples | [Requirement Level](https://opentelemetry.io/docs/specs/semconv/general/attribute-requirement-level/) | Stability |
|---|---|---|---|---|---|
| `category` | string | The Azure category of the log entry. | `AuditEvent`, `GatewayLogs`, `ApplicationGatewayAccessLog` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `correlation.id` | string | The correlation ID of the log entry. | `607964b6-41a5-4e24-a5db-db7aab3b9b34` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `duration` | int | The duration of the operations in milliseconds. | `1000` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `identity` | string | A JSON blob that describes the identity of the user or application that performed the operation. | `someone` | `Opt-In` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `operation.name` | string | The name of the operation. | `SecretGet`, `Microsoft.ApiManagement/GatewayLogs`, `ApplicationGatewayAccess` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `operation.version` | string | The version of the operation. | `1.0` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `properties` | string[] | The properties provided in the Azure Resource Log. | `['statusCode="Created",serviceRequestId="50d5cddb-8ca0-47ad-9b80-6cde2207f97c"']` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `result.type` | string | The status associated with the logged event. | `Started`, `In Progress`, `Succeeded`, `Failed`, `Active`, `Resolved` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `result.signature` | string | The substatus of associated with the logged event. | `OK` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `result.description` | string | The description of the result. | `The operation was successful`, `The operation failed` | `Required` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `tenant.id` | string | The tenant ID of the Active Directory tenant that this event is tied to. | `607964b6-41a5-4e24-a5db-db7aab3b9b34` | `Conditionally Required`: if the event is tied to an Active Directory tenant. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
<!-- end of manually added table -->

See [Azure Resource Log definition](/model/logs/azure.yaml) for the details.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
100 changes: 100 additions & 0 deletions model/logs/azure.yaml
MikeGoldsmith marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
groups:
- id: az.resource.log
stability: experimental
type: event
name: az.resource.log
brief: >
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:
- ref: event.name
- ref: az.service_request_id
- ref: cloud.resource_id
MikeGoldsmith marked this conversation as resolved.
Show resolved Hide resolved
# Future Note: When the build tools support this definition please uncomment and validate the details

Check warning on line 14 in model/logs/azure.yaml

View workflow job for this annotation

GitHub Actions / yamllint

[comments-indentation] comment not indented like content
MikeGoldsmith marked this conversation as resolved.
Show resolved Hide resolved
# included here and what has been added to the manual markdown table
MikeGoldsmith marked this conversation as resolved.
Show resolved Hide resolved
# body:
# fields:
# - id: category
# type: string
# stability: experimental
# brief: "The Azure category of the log entry."
# examples:
# - AuditEvent
# - GatewayLogs
# - ApplicationGatewayAccessLog
# - id: correlation.id
# type: string
# stability: experimental
# brief: "The correlation ID of the log entry."
# examples:
# - 607964b6-41a5-4e24-a5db-db7aab3b9b34
# - id: duration
# type: int
# stability: experimental
# brief: "The duration of the operations in milliseconds."
# examples:
# - 1000
# - id: identity
# type: string
# stability: experimental
# brief: >
# "A JSON blob that describes the identity of the user or application that performed the operation."
# note: >
# Typically, this field includes the authorization and claims or JWT token from Active Directory.
# > Warning:
# > this field contains sensitive (PII) information."
# requirement_level: opt-in
# examples:
# - "someone"
# - id: operation.name
# type: string
# stability: experimental
# brief: "The name of the operation."
# examples:
# - SecretGet
# - Microsoft.ApiManagement/GatewayLogs
# - ApplicationGatewayAccess
# - id: operation.version
# type: string
# stability: experimental
# brief: "The version of the operation."
# examples:
# - "1.0"
# - id: properties
# type: template[string[]]
# stability: experimental
# brief: "The properties provided in the Azure Resource Log."
# examples: ['statusCode="Created",serviceRequestId="50d5cddb-8ca0-47ad-9b80-6cde2207f97c"']
# - id: result.type
# type: string
# stability: experimental
# brief: "The status associated with the logged event."
# examples:
# - "Started"
# - "In Progress"
# - "Succeeded"
# - "Failed"
# - "Active"
# - "Resolved"
# - id: result.signature
# type: string
# stability: experimental
# brief: "The substatus of associated with the logged event. "
# examples:
# - "OK"
# - id: result.description
# type: string
# stability: experimental
# brief: "The description of the result."
# examples:
# - "The operation was successful"
# - "The operation failed"
# - id: tenant.id
# type: string
# stability: experimental
# brief: "The tenant ID of the Active Directory tenant that this event is tied to."
# requirement_level:
# conditionally_required: "if the event is tied to an Active Directory tenant."
# examples:
# - "00000000-0000-0000-0000-000000000000"
13 changes: 13 additions & 0 deletions model/registry/azure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
groups:
- id: registry.azure.sdk
prefix: az
type: attribute_group
brief: >
This document defines generic attributes for Azure SDK.
attributes:
- id: service_request_id
type: string
stability: experimental
brief: "The unique identifier of the service request. It's generated by the Azure service and returned with the response."
examples:
- "00000000-0000-0000-0000-000000000000"
Loading