NOTE: This is in beta and is expected to GA in Fall 2020.
Launcher is a configuration layer that chooses default values for configuration options that many OpenTelemetry users want. It provides a single function in each language to simplify discovery of the options and components available to users. The goal of Launcher is to help users that aren't familiar with OpenTelemetry quickly ramp up on what they need to get going and instrument.
npm i lightstep-opentelemetry-launcher-node
Minimal setup
const {
lightstep,
opentelemetry,
} = require('lightstep-opentelemetry-launcher-node');
const sdk = lightstep.configureOpenTelemetry({
accessToken: 'YOUR ACCESS TOKEN',
serviceName: 'locl-ex',
});
sdk.start().then(() => {
const tracer = opentelemetry.trace.getTracer('otel-node-example');
const span = tracer.startSpan('test-span');
span.end();
tracer.getActiveSpanProcessor().shutdown();
});
Config Option | Env Variable | Required | Default |
---|---|---|---|
serviceName | LS_SERVICE_NAME | y | - |
serviceVersion | LS_SERVICE_VERSION | n | unknown |
spanEndpoint | OTEL_EXPORTER_OTLP_SPAN_ENDPOINT | n | https://ingest.lightstep.com:443/api/v2/otel/trace |
metricEndpoint | OTEL_EXPORTER_OTLP_METRIC_ENDPOINT | n | https://ingest.lightstep.com:443/metrics |
accessToken | LS_ACCESS_TOKEN | n | - |
logLevel | OTEL_LOG_LEVEL | n | info |
propagators | OTEL_PROPAGATORS | n | b3 |
resource | OTEL_RESOURCE_ATTRIBUTES | n | - |
In addition the options below, the configureOpenTelemetry
function will take any configuration
options supported by the OpenTelemetry Node SDK package and its return value is a NodeSDK instance.
See the OpenTelemetry Node SDK documentation for more details.
One of the key principles behind putting together Launcher is to make lives of OpenTelemetry users easier, this means that there is no special configuration that requires users to install Launcher in order to use OpenTelemetry. It also means that any users of Launcher can leverage the flexibility of configuring OpenTelemetry as they need.
Another decision we made with launcher is to provide end users with a layer of validation of their configuration. This provides us the ability to give feedback to our users faster, so they can start collecting telemetry sooner.
Start using it today in Go, Java, Javascript and Python and let us know what you think!
Made with @ Lightstep