Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
lightstep-opentelemetry-launcher-node
Advanced tools
Lightstep Launcher - a configuration layer OpenTelemetry Node.js
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
Put the following in tracing.js
const { lightstep } = require('lightstep-opentelemetry-launcher-node');
const sdk = lightstep.configureOpenTelemetry({
accessToken: 'YOUR ACCESS TOKEN',
serviceName: 'otel-example',
});
// initialize and start the SDK
sdk.start();
// Gracefully shutdown the SDK
const process = require('process');
process.on('SIGTERM', () => {
sdk
.shutdown()
.then(
() => console.log('SDK shut down successfully'),
(err) => console.log('Error shutting down SDK', err)
)
.finally(() => process.exit(0));
});
node -r ./tracing.js app.js
While the built-in automatic instrumentation will provide good coverage for many users, there are scenarios where users may want to write custom instrumentation, or enrich the existing telemetry. Below are links to some resources about the OpenTelemetry API and some examples of its usage:
Config Option | Env Variable | Required | Default |
---|---|---|---|
serviceName | LS_SERVICE_NAME | y | - |
serviceVersion | LS_SERVICE_VERSION | n | unknown |
spanEndpoint | OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | n | https://ingest.lightstep.com/traces/otlp/v0.9 |
metricsEndpoint | OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | n | https://ingest.lightstep.com/metrics/otlp/v0.9 |
metricsReportingPeriod | OTEL_EXPORTER_OTLP_METRICS_PERIOD | n | 30000 |
metricsEnabled | LS_METRICS_ENABLED | n | false |
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.
sdk.start().then(...);
should be changed to sdk.start();
. It is now recommended to use a tracing.js
with node -r
. See the example for 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
2.2.0
FAQs
Lightstep Launcher - a configuration layer OpenTelemetry Node.js
The npm package lightstep-opentelemetry-launcher-node receives a total of 693 weekly downloads. As such, lightstep-opentelemetry-launcher-node popularity was classified as not popular.
We found that lightstep-opentelemetry-launcher-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.