1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-04 09:43:23 +02:00

Touch up details

This commit is contained in:
wtong98 2020-06-01 08:41:57 -05:00
parent 94c630dbbb
commit de094be4fc
2 changed files with 10 additions and 7 deletions

View File

@ -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

View File

@ -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"),