{"id":18767759,"url":"https://github.com/lightstep/otel-launcher-node","last_synced_at":"2025-04-13T06:32:29.180Z","repository":{"id":38793879,"uuid":"279936776","full_name":"lightstep/otel-launcher-node","owner":"lightstep","description":"Launcher, a Lightstep Distro for OpenTelemetry Node.js 🚀","archived":false,"fork":false,"pushed_at":"2023-11-14T09:30:06.000Z","size":201,"stargazers_count":25,"open_issues_count":13,"forks_count":6,"subscribers_count":52,"default_branch":"main","last_synced_at":"2025-03-26T23:21:56.051Z","etag":null,"topics":["javascript","nodejs","opentelemetry"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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}},"created_at":"2020-07-15T17:42:14.000Z","updated_at":"2024-10-25T05:17:41.000Z","dependencies_parsed_at":"2023-02-12T21:31:37.542Z","dependency_job_id":null,"html_url":"https://github.com/lightstep/otel-launcher-node","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightstep%2Fotel-launcher-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightstep","download_url":"https://codeload.github.com/lightstep/otel-launcher-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501883,"owners_count":21114682,"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":["javascript","nodejs","opentelemetry"],"created_at":"2024-11-07T19:08:28.938Z","updated_at":"2025-04-13T06:32:26.186Z","avatar_url":"https://github.com/lightstep.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Launcher, a Lightstep Distro for OpenTelemetry 🚀 [Deprecated]\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### 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\nnpm i lightstep-opentelemetry-launcher-node\n```\n\n### Configure\n\n#### Setup Tracing\n\nPut the following in `tracing.js`\n\n```javascript\nconst { lightstep } = require('lightstep-opentelemetry-launcher-node');\n\nconst sdk = lightstep.configureOpenTelemetry({\n  accessToken: 'YOUR ACCESS TOKEN',\n  serviceName: 'otel-example',\n});\n\n// initialize and start the SDK\nsdk.start();\n\n// Gracefully shutdown the SDK\nconst process = require('process');\nprocess.on('SIGTERM', () =\u003e {\n  sdk\n    .shutdown()\n    .then(\n      () =\u003e console.log('SDK shut down successfully'),\n      (err) =\u003e console.log('Error shutting down SDK', err)\n    )\n    .finally(() =\u003e process.exit(0));\n});\n```\n\n#### Run Your Application\n\n```javascript\nnode -r ./tracing.js app.js\n```\n\n### Customization\n\nWhile the built-in automatic instrumentation will provide good coverage for many\nusers, there are scenarios where users may want to write custom instrumentation,\nor enrich the existing telemetry. Below are links to some resources about the\nOpenTelemetry API and some examples of its usage:\n\n- [OpenTelemetry JS Tracing API][otel-js-tracing-api]\n- [OpenTelemetry JS Examples][otel-js-examples]\n\n### Configuration Options\n\n| Config Option          | Env Variable                        | Required | Default                                        |\n| ---------------------- | ----------------------------------- | -------- | ---------------------------------------------- |\n| serviceName            | LS_SERVICE_NAME                     | y        | -                                              |\n| serviceVersion         | LS_SERVICE_VERSION                  | n        | unknown                                        |\n| spanEndpoint           | OTEL_EXPORTER_OTLP_TRACES_ENDPOINT  | n        | https://ingest.lightstep.com/traces/otlp/v0.9  |\n| metricsEndpoint        | OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | n        | https://ingest.lightstep.com/metrics/otlp/v0.9 |\n| metricsReportingPeriod | OTEL_EXPORTER_OTLP_METRICS_PERIOD   | n        | 30000                                          |\n| metricsEnabled         | LS_METRICS_ENABLED                  | n        | false                                          |\n| accessToken            | LS_ACCESS_TOKEN                     | n        | -                                              |\n| logLevel               | OTEL_LOG_LEVEL                      | n        | info                                           |\n| propagators            | OTEL_PROPAGATORS                    | n        | b3                                             |\n| resource               | OTEL_RESOURCE_ATTRIBUTES            | n        | -                                              |\n\n#### Additional Options\n\nIn addition the options below, the `configureOpenTelemetry` function will take any configuration\noptions supported by the OpenTelemetry Node SDK package and its return value is a NodeSDK instance.\nSee the [OpenTelemetry Node SDK documentation](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) for more details.\n\n### Upgrade Guidelines\n\n#### 1.3.0 to 2.0.0\n* NodeSDK.start() is now synchronous and no longer returns a promise. At a minimum, calls to `sdk.start().then(...);` should be changed to `sdk.start();`. It is now recommended to use a `tracing.js` with `node -r`. See [the example](#setup-tracing) for details.\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---\n\n_Made with_ ![:heart:](https://a.slack-edge.com/production-standard-emoji-assets/10.2/apple-medium/2764-fe0f.png) _@ [Lightstep](http://lightstep.com/)_\n\n[otel-js-tracing-api]: https://github.com/open-telemetry/opentelemetry-js-api/blob/main/docs/tracing.md\n[otel-js-examples]: https://github.com/open-telemetry/opentelemetry-js/tree/main/examples\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Fotel-launcher-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightstep%2Fotel-launcher-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightstep%2Fotel-launcher-node/lists"}