[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [go.opentelemetry.io/otel/sdk/log](https://togithub.com/open-telemetry/opentelemetry-go) | `v0.2.0-alpha` -> `v0.3.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/go.opentelemetry.io%2fotel%2fsdk%2flog/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/go.opentelemetry.io%2fotel%2fsdk%2flog/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/go.opentelemetry.io%2fotel%2fsdk%2flog/v0.2.0-alpha/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/go.opentelemetry.io%2fotel%2fsdk%2flog/v0.2.0-alpha/v0.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>open-telemetry/opentelemetry-go (go.opentelemetry.io/otel/sdk/log)</summary> ### [`v0.3.0`](https://togithub.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0) This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality. There is still a possibility of breaking changes. ##### Added - Add `Observer` metric instrument. ([#​474](https://togithub.com/open-telemetry/opentelemetry-go/issues/474)) - Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. ([#​494](https://togithub.com/open-telemetry/opentelemetry-go/issues/494)) - Simplified export setup pipeline for the jaeger exporter to match other exporters. ([#​459](https://togithub.com/open-telemetry/opentelemetry-go/issues/459)) - The zipkin trace exporter. ([#​495](https://togithub.com/open-telemetry/opentelemetry-go/issues/495)) - The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. ([#​497](https://togithub.com/open-telemetry/opentelemetry-go/issues/497)) ([#​544](https://togithub.com/open-telemetry/opentelemetry-go/issues/544)) ([#​545](https://togithub.com/open-telemetry/opentelemetry-go/issues/545)) - The `StatusMessage` field was add to the trace `Span`. ([#​524](https://togithub.com/open-telemetry/opentelemetry-go/issues/524)) - Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. ([#​525](https://togithub.com/open-telemetry/opentelemetry-go/issues/525)) - The `Resource` type was added to the SDK. ([#​528](https://togithub.com/open-telemetry/opentelemetry-go/issues/528)) - The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. ([#​538](https://togithub.com/open-telemetry/opentelemetry-go/issues/538)) - The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction. Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. ([#​560](https://togithub.com/open-telemetry/opentelemetry-go/issues/560)) - A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. ([#​560](https://togithub.com/open-telemetry/opentelemetry-go/issues/560)) - Scripts to better automate the release process. ([#​576](https://togithub.com/open-telemetry/opentelemetry-go/issues/576)) ##### Changed - Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. ([#​506](https://togithub.com/open-telemetry/opentelemetry-go/issues/506)) - Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. ([#​511](https://togithub.com/open-telemetry/opentelemetry-go/issues/511)) - Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. ([#​511](https://togithub.com/open-telemetry/opentelemetry-go/issues/511)) - The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. ([#​524](https://togithub.com/open-telemetry/opentelemetry-go/issues/524)) - Updated the trace `Sampler` interface conform to the OpenTelemetry specification. ([#​531](https://togithub.com/open-telemetry/opentelemetry-go/issues/531)) - Rename metric API `Options` to `Config`. ([#​541](https://togithub.com/open-telemetry/opentelemetry-go/issues/541)) - Rename metric `Counter` aggregator to be `Sum`. ([#​541](https://togithub.com/open-telemetry/opentelemetry-go/issues/541)) - Unify metric options into `Option` from instrument specific options. ([#​541](https://togithub.com/open-telemetry/opentelemetry-go/issues/541)) - The trace API's `TraceProvider` now support `Resource`s. ([#​545](https://togithub.com/open-telemetry/opentelemetry-go/issues/545)) - Correct error in zipkin module name. ([#​548](https://togithub.com/open-telemetry/opentelemetry-go/issues/548)) - The jaeger trace exporter now supports `Resource`s. ([#​551](https://togithub.com/open-telemetry/opentelemetry-go/issues/551)) - Metric SDK now supports `Resource`s. The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. ([#​552](https://togithub.com/open-telemetry/opentelemetry-go/issues/552)) - Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. ([#​557](https://togithub.com/open-telemetry/opentelemetry-go/issues/557)) - The stdout trace exporter now supports `Resource`s. ([#​558](https://togithub.com/open-telemetry/opentelemetry-go/issues/558)) - The metric `Descriptor` is now included at the API instead of the SDK. ([#​560](https://togithub.com/open-telemetry/opentelemetry-go/issues/560)) - Replace `Ordered` with an iterator in `export.Labels`. ([#​567](https://togithub.com/open-telemetry/opentelemetry-go/issues/567)) ##### Removed - The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. ([#​452](https://togithub.com/open-telemetry/opentelemetry-go/issues/452)) - The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. ([#​560](https://togithub.com/open-telemetry/opentelemetry-go/issues/560)) - `GetDescriptor` from the metric SDK. ([#​575](https://togithub.com/open-telemetry/opentelemetry-go/issues/575)) - The `Gauge` instrument from the metric API. ([#​537](https://togithub.com/open-telemetry/opentelemetry-go/issues/537)) ##### Fixed - Make histogram aggregator checkpoint consistent. ([#​438](https://togithub.com/open-telemetry/opentelemetry-go/issues/438)) - Update README with import instructions and how to build and test. ([#​505](https://togithub.com/open-telemetry/opentelemetry-go/issues/505)) - The default label encoding was updated to be unique. ([#​508](https://togithub.com/open-telemetry/opentelemetry-go/issues/508)) - Use `NewRoot` in the othttp plugin for public endpoints. ([#​513](https://togithub.com/open-telemetry/opentelemetry-go/issues/513)) - Fix data race in `BatchedSpanProcessor`. ([#​518](https://togithub.com/open-telemetry/opentelemetry-go/issues/518)) - Skip test-386 for Mac OS 10.15.x (Catalina and upwards). [#​521](https://togithub.com/open-telemetry/opentelemetry-go/issues/521) - Use a variable-size array to represent ordered labels in maps. ([#​523](https://togithub.com/open-telemetry/opentelemetry-go/issues/523)) - Update the OTLP protobuf and update changed import path. ([#​532](https://togithub.com/open-telemetry/opentelemetry-go/issues/532)) - Use `StateLocker` implementation in `MinMaxSumCount`. ([#​546](https://togithub.com/open-telemetry/opentelemetry-go/issues/546)) - Eliminate goroutine leak in histogram stress test. ([#​547](https://togithub.com/open-telemetry/opentelemetry-go/issues/547)) - Update OTLP exporter with latest protobuf. ([#​550](https://togithub.com/open-telemetry/opentelemetry-go/issues/550)) - Add filters to the othttp plugin. ([#​556](https://togithub.com/open-telemetry/opentelemetry-go/issues/556)) - Provide an implementation of the `Header*` filters that do not depend on Go 1.14. ([#​565](https://togithub.com/open-telemetry/opentelemetry-go/issues/565)) - Encode labels once during checkpoint. The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter. This is a cheap and quick way to avoid encoding the labels on every collection interval. ([#​572](https://togithub.com/open-telemetry/opentelemetry-go/issues/572)) - Run coverage over all packages in `COVERAGE_MOD_DIR`. ([#​573](https://togithub.com/open-telemetry/opentelemetry-go/issues/573)) ### Changes since v0.2.3 [`a1c2439`](a1c243965e
) Prepare for releasing v0.3.0 ([#​578](https://togithub.com/open-telemetry/opentelemetry-go/issues/578)) [`a15e507`](a15e507b2e
) Scripts for releasing. ([#​576](https://togithub.com/open-telemetry/opentelemetry-go/issues/576)) [`7623fc5`](7623fc544a
) Remove GetDescriptor ([#​575](https://togithub.com/open-telemetry/opentelemetry-go/issues/575)) [`c95360f`](c95360fc06
) Run coverage over all packages beneath COVERAGE_MOD_DIR ([#​573](https://togithub.com/open-telemetry/opentelemetry-go/issues/573)) [`cc756f6`](cc756f6a8d
) Encode labels once during checkpoint ([#​572](https://togithub.com/open-telemetry/opentelemetry-go/issues/572)) [`f7df68b`](f7df68b68b
) Add support for Resources in the SDK ([#​552](https://togithub.com/open-telemetry/opentelemetry-go/issues/552)) [`a01f63b`](a01f63bec4
) Replace `Ordered` with an iterator in `export.Labels`. ([#​567](https://togithub.com/open-telemetry/opentelemetry-go/issues/567)) [`d8682c1`](d8682c1999
) Refactor the SDK helpers, create MeterImpl ([#​560](https://togithub.com/open-telemetry/opentelemetry-go/issues/560)) [`e0406dd`](e0406dd3eb
) Provide an implementation of the Header\* filters that does not depend on go1.14 ([#​565](https://togithub.com/open-telemetry/opentelemetry-go/issues/565)) [`80b720a`](80b720a771
) update stdout trace with resource. ([#​558](https://togithub.com/open-telemetry/opentelemetry-go/issues/558)) [`435c39a`](435c39aab4
) Update OTLP exporter with latest proto ([#​550](https://togithub.com/open-telemetry/opentelemetry-go/issues/550)) [`74a5285`](74a528520b
) update jaeger exporter to translate resources to tags. ([#​551](https://togithub.com/open-telemetry/opentelemetry-go/issues/551)) [`2ef25ea`](2ef25ea570
) Add filters for othttp plugin ([#​556](https://togithub.com/open-telemetry/opentelemetry-go/issues/556)) [`217a97d`](217a97d9b6
) Replace ErrNoLastValue and ErrEmptyDataSet by ErrNoData ([#​557](https://togithub.com/open-telemetry/opentelemetry-go/issues/557)) [`6ada85a`](6ada85adba
) (resource_zipkin, go\_114) add resource option to Provider. ([#​545](https://togithub.com/open-telemetry/opentelemetry-go/issues/545)) [`638b865`](638b865c90
) Update Sampler descriptions ([#​511](https://togithub.com/open-telemetry/opentelemetry-go/issues/511)) [`cba1664`](cba1664b46
) Add metrics support to the OTLP exporter ([#​544](https://togithub.com/open-telemetry/opentelemetry-go/issues/544)) [`fcc4aca`](fcc4aca8c7
) Fix typo in module name ([#​548](https://togithub.com/open-telemetry/opentelemetry-go/issues/548)) [`8680783`](8680783750
) Use StateLocker in MinMaxSumCount ([#​546](https://togithub.com/open-telemetry/opentelemetry-go/issues/546)) [`46ac030`](46ac030360
) Eliminate goroutine leak in histogram stress test ([#​547](https://togithub.com/open-telemetry/opentelemetry-go/issues/547)) [`2ccddfe`](2ccddfe82a
) Update README with import instructions and how to build / test ([#​505](https://togithub.com/open-telemetry/opentelemetry-go/issues/505)) [`23e65ac`](23e65ac79d
) Remove metric options; rename "counter" aggregator to "sum" ([#​541](https://togithub.com/open-telemetry/opentelemetry-go/issues/541)) [`d9210f5`](d9210f5676
) Zipkin exporter ([#​495](https://togithub.com/open-telemetry/opentelemetry-go/issues/495)) [`4047c08`](4047c0877a
) Introduce metric constructor errors, `MeterMust` wrapper ([#​529](https://togithub.com/open-telemetry/opentelemetry-go/issues/529)) [`288821c`](288821cd22
) Make histogram aggregator checkpoint consistent ([#​438](https://togithub.com/open-telemetry/opentelemetry-go/issues/438)) [`ae9033e`](ae9033e01f
) Use a variable-size array to represent ordered labels in maps ([#​523](https://togithub.com/open-telemetry/opentelemetry-go/issues/523)) [`8575142`](85751428a3
) add shorter version for global providers ([#​538](https://togithub.com/open-telemetry/opentelemetry-go/issues/538)) [`9674c81`](9674c81cb7
) Drop the gauge instrument ([#​537](https://togithub.com/open-telemetry/opentelemetry-go/issues/537)) [`fe0099f`](fe0099fb3d
) \[tracing] add simplified export pipeline setup for Jaeger ([#​459](https://togithub.com/open-telemetry/opentelemetry-go/issues/459)) [`8cddf30`](8cddf30cb2
) Context propagation in opentracing bridge ([#​525](https://togithub.com/open-telemetry/opentelemetry-go/issues/525)) [`7a1cbbc`](7a1cbbc191
) Update Samplers to conform to Spec ([#​531](https://togithub.com/open-telemetry/opentelemetry-go/issues/531)) [`af54288`](af5428829b
) Update OTLP protos, fix imports ([#​532](https://togithub.com/open-telemetry/opentelemetry-go/issues/532)) [`1ff0f2a`](1ff0f2a26a
) add resource type. ([#​528](https://togithub.com/open-telemetry/opentelemetry-go/issues/528)) [`3bf3927`](3bf3927eb5
) Add status message parameter ([#​524](https://togithub.com/open-telemetry/opentelemetry-go/issues/524)) [`5850278`](5850278197
) opentelemetry collector trace exporter ([#​497](https://togithub.com/open-telemetry/opentelemetry-go/issues/497)) [`9459629`](9459629d21
) Remove the StackDriver trace exporter ([#​452](https://togithub.com/open-telemetry/opentelemetry-go/issues/452)) [`43db6ec`](43db6ec76f
) Propose putting isobel to emeritus :( ([#​526](https://togithub.com/open-telemetry/opentelemetry-go/issues/526)) [`79de90a`](79de90a313
) fix data race in BatchedSpanProcessor ([#​518](https://togithub.com/open-telemetry/opentelemetry-go/issues/518)) [`161556a`](161556aab8
) Update provider to use AlwaysSampler instead of ProbabilitySampler ([#​506](https://togithub.com/open-telemetry/opentelemetry-go/issues/506)) [`20ecc38`](20ecc38919
) skip test-386 for Mac OS 10.15.x (Catalina and upwards). ([#​521](https://togithub.com/open-telemetry/opentelemetry-go/issues/521)) [`a202f16`](a202f16100
) Add observer metric ([#​474](https://togithub.com/open-telemetry/opentelemetry-go/issues/474)) [`547d584`](547d584da8
) Add global propagators ([#​494](https://togithub.com/open-telemetry/opentelemetry-go/issues/494)) [`6769330`](6769330394
) use NewRoot() standard code. ([#​513](https://togithub.com/open-telemetry/opentelemetry-go/issues/513)) [`148c9ce`](148c9ce5ba
) Make the default label encoding unique ([#​508](https://togithub.com/open-telemetry/opentelemetry-go/issues/508)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbIlNraXAgQ2hhbmdlbG9nIiwiZGVwZW5kZW5jaWVzIl19--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.22 | amd64 |
Ubuntu | 1.21 | amd64 |
Ubuntu | 1.22 | 386 |
Ubuntu | 1.21 | 386 |
Linux | 1.22 | arm64 |
Linux | 1.21 | arm64 |
MacOS | 1.22 | amd64 |
MacOS | 1.21 | amd64 |
Windows | 1.22 | amd64 |
Windows | 1.21 | amd64 |
Windows | 1.22 | 386 |
Windows | 1.21 | 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 included 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.