2019-08-05 13:58:24 -07:00
|
|
|
# OpenTelemetry-Go
|
|
|
|
|
2021-02-04 11:13:25 -08:00
|
|
|
[![CI](https://github.com/open-telemetry/opentelemetry-go/workflows/ci/badge.svg)](https://github.com/open-telemetry/opentelemetry-go/actions?query=workflow%3Aci+branch%3Amain)
|
2021-05-24 12:27:43 -04:00
|
|
|
[![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-go/coverage.svg?branch=main)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main)
|
2020-11-12 07:33:04 -08:00
|
|
|
[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel)
|
2019-11-01 11:40:29 -07:00
|
|
|
[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel)
|
2021-02-22 08:38:12 -08:00
|
|
|
[![Slack](https://img.shields.io/badge/slack-@cncf/otel--go-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01NPAXACKT)
|
|
|
|
|
2021-05-03 18:42:32 +00:00
|
|
|
OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/).
|
|
|
|
It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms.
|
2019-06-14 11:37:05 -07:00
|
|
|
|
2020-10-29 09:23:13 -07:00
|
|
|
## Project Status
|
|
|
|
|
2021-09-20 13:02:46 -07:00
|
|
|
| Signal | Status | Project |
|
|
|
|
| ------- | ---------- | ------- |
|
|
|
|
| Traces | Stable | N/A |
|
|
|
|
| Metrics | Alpha | N/A |
|
|
|
|
| Logs | Frozen [1] | N/A |
|
2020-10-29 09:23:13 -07:00
|
|
|
|
2021-09-20 13:02:46 -07:00
|
|
|
- [1]: The Logs signal development is halted for this project while we develop both Traces and Metrics.
|
2021-06-18 15:55:09 +00:00
|
|
|
No Logs Pull Requests are currently being accepted.
|
2020-10-29 09:23:13 -07:00
|
|
|
|
|
|
|
Progress and status specific to this repository is tracked in our local
|
|
|
|
[project boards](https://github.com/open-telemetry/opentelemetry-go/projects)
|
|
|
|
and
|
|
|
|
[milestones](https://github.com/open-telemetry/opentelemetry-go/milestones).
|
|
|
|
|
2020-12-29 10:34:46 -08:00
|
|
|
Project versioning information and stability guarantees can be found in the
|
|
|
|
[versioning documentation](./VERSIONING.md).
|
|
|
|
|
2021-03-01 08:38:23 -08:00
|
|
|
### Compatibility
|
|
|
|
|
2022-08-10 08:57:01 -07:00
|
|
|
OpenTelemetry-Go ensures compatibility with the current supported versions of
|
|
|
|
the [Go language](https://golang.org/doc/devel/release#policy):
|
2021-11-22 10:09:42 -06:00
|
|
|
|
2022-08-10 08:57:01 -07:00
|
|
|
> 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.
|
2021-11-22 10:09:42 -06:00
|
|
|
|
2022-08-10 08:57:01 -07:00
|
|
|
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.
|
2021-03-01 08:38:23 -08:00
|
|
|
|
|
|
|
| OS | Go Version | Architecture |
|
|
|
|
| ------- | ---------- | ------------ |
|
2023-02-08 14:08:57 -08:00
|
|
|
| Ubuntu | 1.20 | amd64 |
|
2022-08-10 08:45:14 -07:00
|
|
|
| Ubuntu | 1.19 | amd64 |
|
2022-03-18 11:36:16 -05:00
|
|
|
| Ubuntu | 1.18 | amd64 |
|
2023-02-08 14:08:57 -08:00
|
|
|
| Ubuntu | 1.20 | 386 |
|
2022-08-10 08:45:14 -07:00
|
|
|
| Ubuntu | 1.19 | 386 |
|
2022-03-18 11:36:16 -05:00
|
|
|
| Ubuntu | 1.18 | 386 |
|
2023-02-08 14:08:57 -08:00
|
|
|
| MacOS | 1.20 | amd64 |
|
2022-08-10 08:45:14 -07:00
|
|
|
| MacOS | 1.19 | amd64 |
|
2022-03-18 11:36:16 -05:00
|
|
|
| MacOS | 1.18 | amd64 |
|
2023-02-08 14:08:57 -08:00
|
|
|
| Windows | 1.20 | amd64 |
|
2022-08-10 08:45:14 -07:00
|
|
|
| Windows | 1.19 | amd64 |
|
2022-03-18 11:36:16 -05:00
|
|
|
| Windows | 1.18 | amd64 |
|
2023-02-08 14:08:57 -08:00
|
|
|
| Windows | 1.20 | 386 |
|
2022-08-10 08:45:14 -07:00
|
|
|
| Windows | 1.19 | 386 |
|
2022-03-18 11:36:16 -05:00
|
|
|
| Windows | 1.18 | 386 |
|
2021-03-01 08:38:23 -08:00
|
|
|
|
|
|
|
While this project should work for other systems, no compatibility guarantees
|
|
|
|
are made for those systems currently.
|
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
## Getting Started
|
2019-10-01 22:43:06 -07:00
|
|
|
|
2020-12-17 19:00:34 +01:00
|
|
|
You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/go/getting-started/).
|
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
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.
|
2019-10-01 22:43:06 -07:00
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
### Instrumentation
|
2019-10-01 22:43:06 -07:00
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
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
|
2021-02-04 11:13:25 -08:00
|
|
|
libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation).
|
2019-10-01 22:43:06 -07:00
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
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
|
2022-03-25 17:49:48 +00:00
|
|
|
[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel)
|
2020-08-27 12:14:37 -07:00
|
|
|
package. The included [examples](./example/) are a good way to see some
|
|
|
|
practical uses of this process.
|
2020-03-12 16:52:12 +00:00
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
### Export
|
2019-10-01 22:43:06 -07:00
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
Now that your application is instrumented to collect telemetry, it needs an
|
|
|
|
export pipeline to send that telemetry to an observability platform.
|
2019-10-01 22:43:06 -07:00
|
|
|
|
2021-06-12 18:39:22 +00:00
|
|
|
All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters).
|
|
|
|
|
|
|
|
| Exporter | Metrics | Traces |
|
|
|
|
| :-----------------------------------: | :-----: | :----: |
|
|
|
|
| [Jaeger](./exporters/jaeger/) | | ✓ |
|
|
|
|
| [OTLP](./exporters/otlp/) | ✓ | ✓ |
|
|
|
|
| [Prometheus](./exporters/prometheus/) | ✓ | |
|
|
|
|
| [stdout](./exporters/stdout/) | ✓ | ✓ |
|
|
|
|
| [Zipkin](./exporters/zipkin/) | | ✓ |
|
|
|
|
|
2019-10-01 18:16:45 +02:00
|
|
|
## Contributing
|
|
|
|
|
2020-08-27 12:14:37 -07:00
|
|
|
See the [contributing documentation](CONTRIBUTING.md).
|