2019-08-05 22:58:24 +02:00
|
|
|
# OpenTelemetry-Go
|
|
|
|
|
2021-02-04 21:13:25 +02: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 18:27:43 +02: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 17:33:04 +02:00
|
|
|
[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel)
|
2019-11-01 20:40:29 +02:00
|
|
|
[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel)
|
2021-02-22 18:38:12 +02: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 20:42:32 +02: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 20:37:05 +02:00
|
|
|
|
2020-10-29 18:23:13 +02:00
|
|
|
## Project Status
|
|
|
|
|
2021-09-20 22:02:46 +02:00
|
|
|
| Signal | Status | Project |
|
|
|
|
| ------- | ---------- | ------- |
|
|
|
|
| Traces | Stable | N/A |
|
|
|
|
| Metrics | Alpha | N/A |
|
|
|
|
| Logs | Frozen [1] | N/A |
|
2020-10-29 18:23:13 +02:00
|
|
|
|
2021-09-20 22:02:46 +02:00
|
|
|
- [1]: The Logs signal development is halted for this project while we develop both Traces and Metrics.
|
2021-06-18 17:55:09 +02:00
|
|
|
No Logs Pull Requests are currently being accepted.
|
2020-10-29 18:23:13 +02: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 20:34:46 +02:00
|
|
|
Project versioning information and stability guarantees can be found in the
|
|
|
|
[versioning documentation](./VERSIONING.md).
|
|
|
|
|
2021-03-01 18:38:23 +02:00
|
|
|
### Compatibility
|
|
|
|
|
2021-11-22 18:09:42 +02:00
|
|
|
OpenTelemetry-Go attempts to track the current supported versions of the
|
|
|
|
[Go language](https://golang.org/doc/devel/release#policy). The release
|
|
|
|
schedule after a new minor version of go is as follows:
|
|
|
|
|
|
|
|
- The first release or one month, which ever is sooner, will add build steps for the new go version.
|
|
|
|
- The first release after three months will remove support for the oldest go version.
|
|
|
|
|
2021-03-01 18:38:23 +02:00
|
|
|
This project is tested on the following systems.
|
|
|
|
|
|
|
|
| OS | Go Version | Architecture |
|
|
|
|
| ------- | ---------- | ------------ |
|
2022-08-10 17:45:14 +02:00
|
|
|
| Ubuntu | 1.19 | amd64 |
|
2022-03-18 18:36:16 +02:00
|
|
|
| Ubuntu | 1.18 | amd64 |
|
2021-10-05 19:42:29 +02:00
|
|
|
| Ubuntu | 1.17 | amd64 |
|
2022-08-10 17:45:14 +02:00
|
|
|
| Ubuntu | 1.19 | 386 |
|
2022-03-18 18:36:16 +02:00
|
|
|
| Ubuntu | 1.18 | 386 |
|
2021-10-05 19:42:29 +02:00
|
|
|
| Ubuntu | 1.17 | 386 |
|
2022-08-10 17:45:14 +02:00
|
|
|
| MacOS | 1.19 | amd64 |
|
2022-03-18 18:36:16 +02:00
|
|
|
| MacOS | 1.18 | amd64 |
|
2021-10-05 19:42:29 +02:00
|
|
|
| MacOS | 1.17 | amd64 |
|
2022-08-10 17:45:14 +02:00
|
|
|
| Windows | 1.19 | amd64 |
|
2022-03-18 18:36:16 +02:00
|
|
|
| Windows | 1.18 | amd64 |
|
2021-10-05 19:42:29 +02:00
|
|
|
| Windows | 1.17 | amd64 |
|
2022-08-10 17:45:14 +02:00
|
|
|
| Windows | 1.19 | 386 |
|
2022-03-18 18:36:16 +02:00
|
|
|
| Windows | 1.18 | 386 |
|
2021-10-05 19:42:29 +02:00
|
|
|
| Windows | 1.17 | 386 |
|
2021-03-01 18:38:23 +02:00
|
|
|
|
|
|
|
While this project should work for other systems, no compatibility guarantees
|
|
|
|
are made for those systems currently.
|
|
|
|
|
2020-08-27 21:14:37 +02:00
|
|
|
## Getting Started
|
2019-10-02 07:43:06 +02:00
|
|
|
|
2020-12-17 20:00:34 +02:00
|
|
|
You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/go/getting-started/).
|
|
|
|
|
2020-08-27 21:14:37 +02: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-02 07:43:06 +02:00
|
|
|
|
2020-08-27 21:14:37 +02:00
|
|
|
### Instrumentation
|
2019-10-02 07:43:06 +02:00
|
|
|
|
2020-08-27 21:14:37 +02: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 21:13:25 +02:00
|
|
|
libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation).
|
2019-10-02 07:43:06 +02:00
|
|
|
|
2020-08-27 21:14:37 +02: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 19:49:48 +02:00
|
|
|
[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel)
|
2020-08-27 21:14:37 +02:00
|
|
|
package. The included [examples](./example/) are a good way to see some
|
|
|
|
practical uses of this process.
|
2020-03-12 18:52:12 +02:00
|
|
|
|
2020-08-27 21:14:37 +02:00
|
|
|
### Export
|
2019-10-02 07:43:06 +02:00
|
|
|
|
2020-08-27 21:14:37 +02: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-02 07:43:06 +02:00
|
|
|
|
2021-06-12 20:39:22 +02: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 21:14:37 +02:00
|
|
|
See the [contributing documentation](CONTRIBUTING.md).
|