You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to disable the instrumentation when running the app locally, but since my code depends on the successful initialisation of the SDK I would need a way to force a pass through even when the required configuration is not met.
Omitting the env var currently triggers this exception:
Invalid configuration: access token missing, must be set when reporting to https://ingest.lightstep.com:443/api/v2/otel/trace. Set LS_ACCESS_TOKEN env var or configure token in code
LightstepConfigurationError: Invalid configuration: access token missing, must be set when reporting to https://ingest.lightstep.com:443/api/v2/otel/trace. Set LS_ACCESS_TOKEN env var or configure token in code
There is no obvious way to disable the instrumentation when those flags aren't set, or at least skipping initialization.
Describe the solution you'd like
I would like to see a flag named "skipInit" / "ignoreInvalid" (since the issue comes from validateConfiguration(config)) in the NodeSDKConfiguration so that I can explicitly define this behaviour depending on the environment I am currently in.
Describe alternatives you've considered
An inelegant alternative would be to for my code to verify if the environment variable exists and create the same initialisation code without the launcher.
Edit:
It looks like setting spanEndpoint: null works.
The text was updated successfully, but these errors were encountered:
obax
changed the title
The absence of the environment variable LS_ACCESS_TOKEN throws an exception
Cannot skip setting variable LS_ACCESS_TOKEN when using the launcher locally
Nov 20, 2020
Is your feature request related to a problem? Please describe.
I would like to disable the instrumentation when running the app locally, but since my code depends on the successful initialisation of the SDK I would need a way to force a pass through even when the required configuration is not met.
Omitting the env var currently triggers this exception:
There is no obvious way to disable the instrumentation when those flags aren't set, or at least skipping initialization.
Describe the solution you'd like
I would like to see a flag named "skipInit" / "ignoreInvalid" (since the issue comes from
validateConfiguration(config)
) in the NodeSDKConfiguration so that I can explicitly define this behaviour depending on the environment I am currently in.Describe alternatives you've considered
An inelegant alternative would be to for my code to verify if the environment variable exists and create the same initialisation code without the launcher.
Edit:
It looks like setting
spanEndpoint: null
works.The text was updated successfully, but these errors were encountered: