{"id":18767774,"url":"https://github.com/lightstep/otel-launcher-go","last_synced_at":"2025-05-16T12:12:01.417Z","repository":{"id":37073973,"uuid":"274263653","full_name":"lightstep/otel-launcher-go","owner":"lightstep","description":"Launcher, a Lightstep Distro for OpenTelemetry Go 🚀","archived":false,"fork":false,"pushed_at":"2025-05-14T15:39:50.000Z","size":2417,"stargazers_count":118,"open_issues_count":13,"forks_count":28,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-05-14T16:27:09.529Z","etag":null,"topics":["golang","opentelemetry"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightstep.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-22T23:29:58.000Z","updated_at":"2025-05-14T15:08:34.000Z","dependencies_parsed_at":"2023-10-17T05:45:28.439Z","dependency_job_id":"119aef57-900a-4d10-aa21-29c62f4409a1","html_url":"https://github.com/lightstep/otel-launcher-go","commit_stats":{"total_commits":406,"total_committers":23,"mean_commits":"17.652173913043477","dds":0.7019704433497537,"last_synced_commit":"89f7b5d600b492215e675921637a98499751f56f"},"previous_names":["lightstep/otel-go","lightstep/opentelemetry-go"],"tags_count":288,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightstep","download_url":"https://codeload.github.com/lightstep/otel-launcher-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254527099,"owners_count":22085919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","opentelemetry"],"created_at":"2024-11-07T19:08:31.006Z","updated_at":"2025-05-16T12:12:01.386Z","avatar_url":"https://github.com/lightstep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![build status](https://github.com/lightstep/otel-launcher-go/workflows/build/badge.svg)\n[![Docs](https://godoc.org/github.com/lightstep/otel-launcher-go/launcher?status.svg)](https://pkg.go.dev/github.com/lightstep/otel-launcher-go/launcher)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lightstep/otel-launcher-go/launcher)](https://goreportcard.com/report/github.com/lightstep/otel-launcher-go/launcher)\n\nIn August 2023, [Lightstep became ServiceNow\nCloud Observability](https://docs.lightstep.com/docs/banner-faq) To ease the\ntransition, all code artifacts will continue to use the Lightstep name. You\ndon't need to do anything to keep using this repository.\n\n# Launcher, a Lightstep Distro for OpenTelemetry 🚀 [Deprecated]\n\n### What is Launcher?\n\nLauncher 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.\n\n### Getting started\n\n```bash\ngo get github.com/lightstep/otel-launcher-go/launcher\n```\n\n### Configure\n\nMinimal setup\n\n```go\nimport \"github.com/lightstep/otel-launcher-go/launcher\"\n\nfunc main() {\n    otel := launcher.ConfigureOpentelemetry(\n        launcher.WithServiceName(\"service-name\"),\n        launcher.WithAccessToken(\"access-token\"),\n    )\n    defer otel.Shutdown()\n}\n```\n\nFor non-lightstep providers, you can set headers directly instead.\n\n```go\nimport \"github.com/lightstep/otel-launcher-go/launcher\"\n\nfunc main() {\n    otel := launcher.ConfigureOpentelemetry(\n        launcher.WithServiceName(\"service-name\"),\n        launcher.WithHeaders(map[string]string{\n            \"service-auth-key\": \"value\",\n            \"service-useful-field\": \"testing\",\n        }),\n    )\n    defer otel.Shutdown()\n}\n```\n\n\nAdditional options\n\n### Configuration Options\n\n| Config Option                           | Env Variable                                     | Required | Default                       |\n|-----------------------------------------|--------------------------------------------------|----------|-------------------------------|\n| WithServiceName                         | LS_SERVICE_NAME                                  | y        | -                             |\n| WithServiceVersion                      | LS_SERVICE_VERSION                               | n        | unknown                       |\n| WithHeaders                             | OTEL_EXPORTER_OTLP_HEADERS                       | n        | {}                            |\n| WithSpanExporterEndpoint                | OTEL_EXPORTER_OTLP_SPAN_ENDPOINT                 | n        | ingest.lightstep.com:443      |\n| WithSpanExporterInsecure                | OTEL_EXPORTER_OTLP_SPAN_INSECURE                 | n        | false                         |\n| WithMetricExporterEndpoint              | OTEL_EXPORTER_OTLP_METRIC_ENDPOINT               | n        | ingest.lightstep.com:443      |\n| WithMetricExporterInsecure              | OTEL_EXPORTER_OTLP_METRIC_INSECURE               | n        | false                         |\n| WithMetricExporterTemporalityPreference | OTEL_EXPORTER_OTLP_METRIC_TEMPORALITY_PREFERENCE | n        | cumulative                    |\n| WithAccessToken                         | LS_ACCESS_TOKEN                                  | n        | -                             |\n| WithLogLevel                            | OTEL_LOG_LEVEL                                   | n        | info                          |\n| WithPropagators                         | OTEL_PROPAGATORS                                 | n        | b3                            |\n| WithResourceAttributes                  | OTEL_RESOURCE_ATTRIBUTES                         | n        | -                             |\n| WithMetricReportingPeriod               | OTEL_EXPORTER_OTLP_METRIC_PERIOD                 | n        | 30s                           |\n| WithMetricsEnabled                      | LS_METRICS_ENABLED                               | n        | true                          |\n| WithMetricsBuiltinsEnabled              | LS_METRICS_BUILTINS_ENABLED                      | n        | true                          |\n| WithMetricsBuiltinLibraries             | LS_METRICS_BUILTIN_LIBRARIES                     | n        | all:stable |\n| WithLightstepMetricsSDK                 | LS_METRICS_SDK                                   | n        | true                          |\n\n### Principles behind Launcher\n\n#### 100% interoperability with OpenTelemetry\n\nOne 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.\n\n#### Validation\n\nAnother 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.\n\nStart using it today in [Go](https://github.com/lightstep/otel-launcher-go), [Java](https://github.com/lightstep/otel-launcher-java), [Javascript](https://github.com/lightstep/otel-launcher-node) and [Python](https://github.com/lightstep/otel-launcher-python) and let us know what you think!\n\n### OpenTelemetry Metrics support\n\n### Builtin metrics libraries\n\nThe Launcher optionally starts selected libraries of builtin\ninstrumentation unless explicitly disabled.  Use\n`WithMetricsBuiltinsEnabled(false)` or set\n`LS_METRICS_BUILTINS_ENABLED=false` to disable all builtin metrics\ninstrumentation.\n\nThe set of builtin metrics libraries can be configured explicitly.\nDue to the evolving nature of OpenTelemetry, the metrics produced in\nthese libraries may vary.  Use `WithMetricsBuiltinLibraries(...)` or\nset `LS_METRICS_BUILTIN_LIBRARIES=...` to configure which builtin\nlibraries are used.  The argument is a comma-separated list of short\nlibrary names, optionally `short_name:version` to select a specific\nversion.  When no version is specified, the \"stable\" instrumentation\nversion is selected.\n\nIn Launcher version 1.11.0, the default builtin libraries changed to\nmore closely-track the OpenTelemetry metrics specification.  The\ndefault setting (\"all:stable\") selects three libraries, described\nbelow:\n\n| Short name | Metrics produced                                                                          |\n|------------|-------------------------------------------------------------------------------------------|\n| host       | system.cpu.time, system.memory.usage, system.memory.utilization, system.network.io        |\n| cputime    | process.cpu.time, process.uptime                                                          |\n| runtime    | process.runtime.go.* generated from [runtime/metrics](https://pkg.go.dev/runtime/metrics), e.g., process.runtime.go.cpu.time |\n\nThe available instrumentation library and versions are listed below:\n\n| Short name | Version   | Instrumentation                                                                                                                                  |\n|------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| all        | stable    | same as cputime:stable,host:stable,runtime:stable                                                                                                |\n| cputime    | stable    | `./lightstep/instrumentation/cputime`                                                                                                            |\n| cputime    | prestable | _none_                                                                                                                                           |\n| runtime    | stable    | `./lightstep/instrumentation/runtime`                                                                                                            |\n| runtime    | prestable | [opentelemetry-go-contrib/instrumentation/runtime](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation/runtime) |\n| host       | stable    | `./lightstep/instrumentation/host`                                                                                                               |\n| host       | prestable | [opentelemetry-go-contrib/instrumentation/host](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation/host)       |\n\nWhen running inside a container where host metrics are already being\ncollected (e.g., using the [OpenTelemetry Collector `hostmetrics`\nreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver)),\nusers may wish to configure only \"cputime\" and \"runtime\" instrumentation.\n\nNote that the \"cputime\" library is a placeholder for metrics that\noverlap with or that we expect to be produced in future versions of\nthe \"runtime\" instrumentation.  For example, [we expect the Go-1.20\n`runtime/metrics` package to include GC and user CPU time\nmetrics](https://go-review.googlesource.com/c/go/+/404307/).  See the\ndocumentation in each of the instrumentation packages for more\ndetails.\n\nTo configure the behavior in Launcher versions 1.10.x and prior, use\n`WithMetricsBuiltinLibraries(\"all:prestable\")` or set\n`LS_METRICS_BUILTIN_LIBRARIES=all:prestable`.\n\n### Lightstep Metrics SDK\n\n**NOTE**: The Lightstep Metrics SDK is enabled by default.\n\nThe Launcher contains an alternative to the [OTel-Go community Metrics\nSDK](https://github.com/open-telemetry/opentelemetry-go) being\nmaintained by Lightstep as a way to quickly validate newer\nOpenTelemetry features, such as the OpenTelemetry exponential\nhistogram.\n\nThe OTel-Go community SDK is not enabled by default.  This option will\nreturn when the OTel-Go community SDK reaches a stable release.\n\nTo select the OTel-Go community Metrics SDK, use\n`WithLightstepMetricsSDK(false)` or set `LS_METRICS_SDK=false`.\n\nThe differences between the OpenTelemetry Metrics SDK specification\nand the alternative SDK are documented in its\n[README](./lightstep/sdk/metric/README.md).\n\n### Metrics Temporality settings\n\nOpenTelemetry metrics SDKs give the user control over \"temporality\",\nwhich is the selection of \"delta\" or \"cumulative\" policies for\naggregating Counter and Histogram instruments.  These settings determine\nboth memory usage and reliability of metrics reporting.\n\nDelta temporality requires less memory than cumulative temporality for\nsynchronous instruments, while Cumulative requires less memory than\ndelta temporality for asynchronous instruments.  When reporting is\nintermittent, cumulative series will average out the missing reports,\nwhereas delta series will have gaps.\n\nNote that Lightstep considers a change of temporality to be a breaking\nchange.  Once a temporality preference has been set, the setting has\nto be maintained.  The temporality preference is configured by calling\n`WithMetricExporterTemporalityPreference()` or using the\n`OTEL_EXPORTER_OTLP_METRIC_TEMPORALITY_PREFERENCE` environment\nvariable.\n\nThe launcher supports the standard \"lowmemory\" temporality preference,\nalso known as \"stateless\" in this library.  This selection configures\nthe ideal behavior for Lightstep by mixing temporality setings.\n\nThe 1.x launcher release series configures the \"cumulative\"\ntemporality preference by default.  The next major release of launcher\nwill configure the \"lowmemory\" temporality preference.\n\nLightstep users are recommended to select either the \"cumulative\" or\n\"lowmemory\" preference.  The OpenTelemetry-specified \"delta\"\ntemporality preference is not recommended for Lightstep users.\n\n------\n\n*Made with*\n![:heart:](https://a.slack-edge.com/production-standard-emoji-assets/10.2/apple-medium/2764-fe0f.png) *@ [Lightstep](http://lightstep.com/)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Fotel-launcher-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightstep%2Fotel-launcher-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Fotel-launcher-go/lists"}