We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We should test whether sampling with distributed tracing works at all. Take this dev patch:
diff --git a/examples/start-elastic-sdk.js b/examples/start-elastic-sdk.js index 99875f0..f0f0116 100644 --- a/examples/start-elastic-sdk.js +++ b/examples/start-elastic-sdk.js @@ -42,6 +42,9 @@ const { ExpressInstrumentation, } = require('@opentelemetry/instrumentation-express'); +const {tracing} = require('@opentelemetry/sdk-node'); +const {ParentBasedSampler, TraceIdRatioBasedSampler} = tracing; + const sdk = new ElasticNodeSDK({ serviceName: path.parse(process.argv[1]).name, // One can **override** completely the instrumentations provided by ElasticNodeSDK @@ -69,6 +91,9 @@ const sdk = new ElasticNodeSDK({ // the OTel NodeSDK, for example: // new AnotherInstrumentation(), ], + sampler: new ParentBasedSampler({ + root: new TraceIdRatioBasedSampler(0.5), + }), });
ParentBasedSampler
TraceIdRatioBasedSampler
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We should test whether sampling with distributed tracing works at all. Take this dev patch:
ParentBasedSampler
by default?TraceIdRatioBasedSampler
if a value is given?The text was updated successfully, but these errors were encountered: