opentelemetry-js/examples/stackdriver-trace
Mayur Kale c6b29233d4
chore: post release update (#766)
2020-02-06 10:59:56 -08:00
..
images feat: stackdriver trace exporter (#648) 2020-01-16 13:22:59 -08:00
.gitignore feat: stackdriver trace exporter (#648) 2020-01-16 13:22:59 -08:00
README.md feat: stackdriver trace exporter (#648) 2020-01-16 13:22:59 -08:00
index.js update examples and getting started for provider and api package (#750) 2020-02-05 10:44:05 -08:00
package.json chore: post release update (#766) 2020-02-06 10:59:56 -08:00

README.md

Overview

This example shows how to use @opentelemetry/tracing to instrument a simple Node.js application - e.g. a batch job - and export spans either to Stackdriver Trace.

Installation

$ # from this directory
$ npm install

Authenticate

If you are running in a GCP environment, the exporter will automatically authenticate as the service account of your environment. Please make sure that it has permission to access stackdriver trace.

If you are not running in a GCP environment you will need to create a service account and save the service account key json in the root of this example named service_account_key.json. For more information, visit https://cloud.google.com/docs/authentication/.

Run the Application

$ # from this directory
$ npm start

View traces

https://console.cloud.google.com/traces/list?project=your-project-id

LICENSE

Apache License 2.0