Git Product home page Git Product logo

otel-launcher-go's Introduction

build status Docs Go Report Card

Launcher, a Lightstep Distro for OpenTelemetry ๐Ÿš€

What is Launcher?

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.

Getting started

go get github.com/lightstep/otel-launcher-go/launcher

Configure

Minimal setup

import "github.com/lightstep/otel-launcher-go/launcher"

func main() {
    otel := launcher.ConfigureOpentelemetry(
        launcher.WithServiceName("service-name"),
        launcher.WithAccessToken("access-token"),
    )
    defer otel.Shutdown()
}

For non-lightstep providers, you can set headers directly instead.

import "github.com/lightstep/otel-launcher-go/launcher"

func main() {
    otel := launcher.ConfigureOpentelemetry(
        launcher.WithServiceName("service-name"),
        launcher.WithHeaders(map[string]string{
            "service-auth-key": "value",
            "service-useful-field": "testing",
        }),
    )
    defer otel.Shutdown()
}

Additional options

Configuration Options

Config Option Env Variable Required Default
WithServiceName LS_SERVICE_NAME y -
WithServiceVersion LS_SERVICE_VERSION n unknown
WithHeaders OTEL_EXPORTER_OTLP_HEADERS n {}
WithSpanExporterEndpoint OTEL_EXPORTER_OTLP_SPAN_ENDPOINT n ingest.lightstep.com:443
WithSpanExporterInsecure OTEL_EXPORTER_OTLP_SPAN_INSECURE n false
WithMetricExporterEndpoint OTEL_EXPORTER_OTLP_METRIC_ENDPOINT n ingest.lightstep.com:443
WithMetricExporterInsecure OTEL_EXPORTER_OTLP_METRIC_INSECURE n false
WithAccessToken LS_ACCESS_TOKEN n -
WithLogLevel OTEL_LOG_LEVEL n info
WithPropagators OTEL_PROPAGATORS n b3
WithResourceAttributes OTEL_RESOURCE_ATTRIBUTES n -
WithMetricReportingPeriod OTEL_EXPORTER_OTLP_METRIC_PERIOD n 30s
WithMetricsEnabled LS_METRICS_ENABLED n True

Principles behind Launcher

100% interoperability with OpenTelemetry

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.

Validation

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 :heart: @ Lightstep

otel-launcher-go's People

Contributors

jmacd avatar dependabot[bot] avatar mitchelldumovic avatar ocelotl avatar madvikinggod avatar codeboten avatar tobert avatar austinlparker avatar cpick avatar kayousterhout avatar hitzhangjie avatar karticus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.