diff --git a/example/README.md b/example/README.md index c34ee3c3a..ae69c6af0 100644 --- a/example/README.md +++ b/example/README.md @@ -3,15 +3,15 @@ Here is a collection of OpenTelemtry-Go examples showcasing basic functionality. ## OTLP This example demonstrates how to export trace and metric data from an -application using OpenTelemetry's own wire protocal OTLP. We will also walk -you through configuring a collector to accept OTLP exports. +application using OpenTelemetry's own wire protocal +[OTLP](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/protocol/README.md). +We will also walk you through configuring a collector to accept OTLP exports. ### How to run? #### Prequisites - go >=1.14 installed -- `GOPATH` is configured -- (optional) OpenTelemetry collector is available +- OpenTelemetry collector is available #### Start the Application An example application is included in `example/otlp`. It simulates the process @@ -28,10 +28,10 @@ go run main.go The application is currently configured to transmit exported data to `localhost:55680`. See [main.go](otlp/main.go) for full details. -Note, if you don't have a receiver configured to take in metric data, the -application will complain about being unable to connect. +Note, if the receiver is incorrectly configured to take in metric data, the +application may complain about being unable to connect. -#### (optional) Configure the Collector +#### Configure the Collector Follow the instructions [on the website](https://opentelemetry.io/docs/collector/about/) to install a working instance of the collector. This example assumes you have the collector installed diff --git a/example/otlp/main.go b/example/otlp/main.go index 804ebd8a5..7ef4f29d6 100644 --- a/example/otlp/main.go +++ b/example/otlp/main.go @@ -55,6 +55,9 @@ func main() { tracer := global.Tracer("mage-sense") meter := global.Meter("mage-read") + // labels represent additional descriptors that can be bound to a metric + // observer or recorder. In this case they describe the location in + // which a spell scroll is scribed. commonLabels := []kv.KeyValue{ kv.String("work-room", "East Scriptorium"), kv.String("occupancy", "69,105"),