mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-07 23:02:15 +02:00
52fb033e13
The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`. This resulted in all subsequent releases not becoming the default latest, meaning that `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages. Renaming the `exporter` directory to `exporters` fixes this issue by consequentially renaming the package. Additionally, this action also renames *all* exporters. This is understood to be a disruptive action to existing users as they will need to update any dependencies they currently have on our exporters. However, it was decided to take this action regardless. The need to resolve the existing issue explained above is highly important, and given the Alpha state of this project these kinds of breaking changes should be expected (though not without reason). Resolves #331 Co-authored-by: Rahul Patel <rghetia@yahoo.com> |
||
---|---|---|
.. | ||
basic | ||
grpc | ||
http | ||
http-stackdriver | ||
jaeger | ||
namedtracer | ||
prometheus | ||
README.md |
Example
HTTP
This is a simple example that demonstrates tracing http request from client to server. The example shows key aspects of tracing such as:
- Root Span (on Client)
- Child Span (on Client)
- Child Span from a Remote Parent (on Server)
- SpanContext Propagation (from Client to Server)
- Span Events
- Span Attributes
Example uses
- open-telemetry SDK as trace instrumentation provider,
- httptrace plugin to facilitate tracing http request on client and server
- http trace_context propagation to propagate SpanContext on the wire.
- stdout exporter to print information about spans in the terminal
How to run?
Prequisites
- go 1.13 installed
- GOPATH is configured.
1 Download git repo
GO111MODULE="" go get -d go.opentelemetry.io/otel
2 Start Server
cd $GOPATH/src/go.opentelemetry.io/otel/example/http/
go run ./server/server.go
3 Start Client
cd $GOPATH/src/go.opentelemetry.io/otel/example/http/
go run ./client/client.go
4 Check traces in stdout
The spans should be visible in stdout in the order that they were exported.