semconv/v1.36.0
(#7032)
Resolve #7030 This generation fixes the following: - The `semconv/weaver.yaml` file is moved to the `semconv/templates/registry/go` to [fix the generation](https://github.com/open-telemetry/opentelemetry-go/issues/7030#issuecomment-3074916061). - Deprecated enum `var`s are no longer generate. - The deprecation of the previous `OSTypeZOS` (`z_os`) conflicts with the replacement (`zos`). - This matches all other generations where deprecated types are not generated and the migration docs identify users need to upgrade when upgrading packages. - Fix metric description rendering to handle multi-line metric descriptions. - Fix filter of deprecated metrics in weaver configuration (see https://github.com/open-telemetry/weaver/issues/847). The release notes for v1.35.0 are included as we do not plan to add a package for that release and it includes breaking changes being released here (i.e. `az.namespace` and `az.service_request_id`) ## [`v1.36.0` semantic convention release notes](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.36.0) <div data-pjax="true" data-test-selector="body-content" data-view-component="true" class="markdown-body my-3"><h3>🚩 Deprecations 🚩</h3> <ul> <li><code>os</code>: Adds the 'deprecated:' tag/attribute to the <code>z_os</code> enum value of <code>os.type</code>. This value was recently deprecated in v1.35.0. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2479" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2479/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2479</a>)</li> </ul> <h3>💡 Enhancements 💡</h3> <ul> <li><code>otel</code>: Replaces <code>otel.sdk.span.ended</code> with <code>otel.sdk.span.started</code> and allow differentiation based on the parent span origin (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2431" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2431/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2431</a>)</li> <li><code>db</code>: Add database context propagation via <code>SET CONTEXT_INFO</code> for SQL Server (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2162" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2162/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2162</a>)</li> <li><code>entities</code>: Adds support for Entity registry and Entity stabilization policies. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2246" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2246/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2246</a>)</li> </ul> <h3>🧰 Bug fixes 🧰</h3> <ul> <li><code>cloud</code>: Exclude deprecated Azure members from code generation on the <code>cloud.platform</code> attribute (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2477" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2477/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2477</a>, <a href="https://github.com/open-telemetry/semantic-conventions/issues/2455" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2455/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2455</a>)</li> </ul> ## [`v1.35.0` semantic convention release notes](https://github.com/open-telemetry/semantic-conventions/releases/tag/v1.35.0) <div data-pjax="true" data-test-selector="body-content" data-view-component="true" class="markdown-body my-3"><h3>🛑 Breaking changes 🛑</h3> <ul> <li> <p><code>azure</code>: Align azure events, attributes, and enum members with general naming guidelines. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/608" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/608/hovercard" aria-keyshortcuts="Alt+ArrowUp">#608</a>, <a href="https://github.com/open-telemetry/semantic-conventions/issues/1708" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/1708/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1708</a>, <a href="https://github.com/open-telemetry/semantic-conventions/issues/1698" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/1698/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1698</a>)</p> <ul> <li>Renamed attributes: <ul> <li><code>az.service_request_id</code> to <code>azure.service.request.id</code></li> <li><code>az.namespace</code> to <code>azure.resource_provider.namespace</code></li> </ul> </li> <li>Renamed events: <ul> <li><code>az.resource.log</code> to <code>azure.resource.log</code></li> </ul> </li> <li>Renamed enum members: <ul> <li><code>az.ai.inference</code> to <code>azure.ai.inference</code> (on <code>gen_ai.system</code>)</li> <li><code>az.ai.openai</code> to <code>azure.ai.openai</code> (on <code>gen_ai.system</code>)</li> <li><code>azure_aks</code> to <code>azure.aks</code> (on <code>cloud.platform</code>)</li> <li><code>azure_app_service</code> to <code>azure.app_service</code> (on <code>cloud.platform</code>)</li> <li><code>azure_container_apps</code> to <code>azure.container_apps</code> (on <code>cloud.platform</code>)</li> <li><code>azure_container_instances</code> to <code>azure.container_instances</code> (on <code>cloud.platform</code>)</li> <li><code>azure_functions</code> to <code>azure.functions</code> (on <code>cloud.platform</code>)</li> <li><code>azure_openshift</code> to <code>azure.open_shift</code> (on <code>cloud.platform</code>)</li> <li><code>azure_vm</code> to <code>azure.vm</code> (on <code>cloud.platform</code>)</li> </ul> </li> </ul> </li> <li> <p><code>system</code>: Revert the change that moved <code>system.cpu.*</code> to <code>cpu.*</code>. The 3 affected metrics are back in <code>system.cpu.*</code>. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1873" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1873/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1873</a>)</p> </li> <li> <p><code>system</code>: Changes system.network.connections to system.network.connection.count (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1800" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1800/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1800</a>)</p> </li> <li> <p><code>k8s</code>: Change instrument type for .limit/.request container metrics from gauge to updowncounter (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2354" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2354/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2354</a>)</p> </li> </ul> <h3>🚩 Deprecations 🚩</h3> <ul> <li><code>os</code>: Deprecate os.type='z_os' and replace with os.type='zos' (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1687" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1687/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1687</a>)</li> </ul> <h3>🚀 New components 🚀</h3> <ul> <li><code>mainframe, zos</code>: Add initial semantic conventions for mainframes (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1687" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1687/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1687</a>)</li> </ul> <h3>💡 Enhancements 💡</h3> <ul> <li> <p><code>dotnet</code>: Define .NET-specific network spans for DNS resolution, TLS handshake, and socket connections, along with HTTP-level spans to (optionally) record relationships between HTTP requests and connections.<br> (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1192" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/1192/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1192</a>)</p> </li> <li> <p><code>k8s</code>: Add <code>k8s.node.allocatable.cpu</code>, <code>k8s.node.allocatable.ephemeral_storage</code>, <code>k8s.node.allocatable.memory</code>, <code>k8s.node.allocatable.pods</code> metrics (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2243" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2243/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2243</a>)</p> </li> <li> <p><code>k8s</code>: Add k8s.container.restart.count metric (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2191" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2191/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2191</a>)</p> </li> <li> <p><code>k8s</code>: Add K8s container resource related metrics (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2074" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2074/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2074</a>)</p> </li> <li> <p><code>k8s</code>: Add k8s.container.ready metric (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2074" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2074/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2074</a>)</p> </li> <li> <p><code>k8s</code>: Add k8s.node.condition metric (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2077" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2077/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2077</a>)</p> </li> <li> <p><code>k8s</code>: Add k8s resource quota metrics (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2076" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2076/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2076</a>)</p> </li> <li> <p><code>events</code>: Update general event guidance to allow complex attributes on events and use them instead of the body fields.<br> (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1651" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1651/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1651</a>, <a href="https://github.com/open-telemetry/semantic-conventions/issues/1669" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1669/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1669</a>)</p> </li> <li> <p><code>k8s</code>: Add k8s.container.status.state and k8s.container.status.reason metrics (<a href="https://github.com/open-telemetry/semantic-conventions/issues/1672" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/1672/hovercard" aria-keyshortcuts="Alt+ArrowUp">#1672</a>)</p> </li> <li> <p><code>feature_flags</code>: Mark feature flag semantic convention as release candidate. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2277" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2277/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2277</a>)</p> </li> <li> <p><code>k8s</code>: Add new resource attributes for <code>k8s.hpa</code> to capture the <code>scaleTargetRef</code> fields (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2008" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2008/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2008</a>)<br> Adds below attributes to the <code>k8s.hpa</code> resource:</p> <ul> <li><code>k8s.hpa.scaletargetref.kind</code></li> <li><code>k8s.hpa.scaletargetref.name</code></li> <li><code>k8s.hpa.scaletargetref.api_version</code></li> </ul> </li> <li> <p><code>k8s</code>: Adds metrics and attributes to track k8s HPA's metric target values for CPU resources. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2182" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2182/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2182</a>)<br> Below metrics are introduced to provide insight into HPA scaling configuration for CPU.</p> <ul> <li><code>k8s.hpa.metric.target.cpu.value</code></li> <li><code>k8s.hpa.metric.target.cpu.average_value</code></li> <li><code>k8s.hpa.metric.target.cpu.average_utilization</code></li> </ul> </li> <li> <p><code>k8s</code>: Explains the rationale behind the Kubernetes resource naming convention. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2245" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2245/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2245</a>)</p> </li> <li> <p><code>all</code>: Adds modelling guide for resource and entity. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2246" data-hovercard-type="issue" data-hovercard-url="/open-telemetry/semantic-conventions/issues/2246/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2246</a>)</p> </li> <li> <p><code>service</code>: Adds stability policies for Entity groups. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2378" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2378/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2378</a>)<br> Entity groups now require <code>role</code> to be filled for attributes.</p> </li> <li> <p><code>otel</code>: Specifies component.type values for Zipkin and Prometheus exporters (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2229" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2229/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2229</a>)</p> </li> </ul> <h3>🧰 Bug fixes 🧰</h3> <ul> <li><code>otel</code>: Removes <code>otel.scope</code> entity. (<a href="https://github.com/open-telemetry/semantic-conventions/issues/2310" data-hovercard-type="pull_request" data-hovercard-url="/open-telemetry/semantic-conventions/pull/2310/hovercard" aria-keyshortcuts="Alt+ArrowUp">#2310</a>)</li> </ul>
OpenTelemetry-Go
OpenTelemetry-Go is the Go implementation of OpenTelemetry. It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms.
Project Status
Signal | Status |
---|---|
Traces | Stable |
Metrics | Stable |
Logs | Beta1 |
Progress and status specific to this repository is tracked in our project boards and milestones.
Project versioning information and stability guarantees can be found in the versioning documentation.
Compatibility
OpenTelemetry-Go ensures compatibility with the current supported versions of the Go language:
Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release.
For versions of Go that are no longer supported upstream, opentelemetry-go will stop ensuring compatibility with these versions in the following manner:
- A minor release of opentelemetry-go will be made to add support for the new supported release of Go.
- The following minor release of opentelemetry-go will remove compatibility testing for the oldest (now archived upstream) version of Go. This, and future, releases of opentelemetry-go may include features only supported by the currently supported versions of Go.
Currently, this project supports the following environments.
OS | Go Version | Architecture |
---|---|---|
Ubuntu | 1.24 | amd64 |
Ubuntu | 1.23 | amd64 |
Ubuntu | 1.24 | 386 |
Ubuntu | 1.23 | 386 |
Ubuntu | 1.24 | arm64 |
Ubuntu | 1.23 | arm64 |
macOS 13 | 1.24 | amd64 |
macOS 13 | 1.23 | amd64 |
macOS | 1.24 | arm64 |
macOS | 1.23 | arm64 |
Windows | 1.24 | amd64 |
Windows | 1.23 | amd64 |
Windows | 1.24 | 386 |
Windows | 1.23 | 386 |
While this project should work for other systems, no compatibility guarantees are made for those systems currently.
Getting Started
You can find a getting started guide on opentelemetry.io.
OpenTelemetry's goal is to provide a single set of APIs to capture distributed traces and metrics from your application and send them to an observability platform. This project allows you to do just that for applications written in Go. There are two steps to this process: instrument your application, and configure an exporter.
Instrumentation
To start capturing distributed traces and metric events from your application it first needs to be instrumented. The easiest way to do this is by using an instrumentation library for your code. Be sure to check out the officially supported instrumentation libraries.
If you need to extend the telemetry an instrumentation library provides or want to build your own instrumentation for your application directly you will need to use the Go otel package. The examples are a good way to see some practical uses of this process.
Export
Now that your application is instrumented to collect telemetry, it needs an export pipeline to send that telemetry to an observability platform.
All officially supported exporters for the OpenTelemetry project are contained in the exporters directory.
Exporter | Logs | Metrics | Traces |
---|---|---|---|
OTLP | ✓ | ✓ | ✓ |
Prometheus | ✓ | ||
stdout | ✓ | ✓ | ✓ |
Zipkin | ✓ |
Contributing
See the contributing documentation.