Skip to content
This repository was archived by the owner on Apr 22, 2022. It is now read-only.

Conversation

@alrosot
Copy link

@alrosot alrosot commented Jul 26, 2021

This is a spin-off of #27

The build there is breaking for unrelated changes (it started to fail in Jan 2021).

From my investigation it seems we were fine with Tedious up to version 9.2.3 (https://app.circleci.com/pipelines/github/lightstep/ls-trace-js/441/workflows/8063a754-795a-456f-b198-7225588a9964/jobs/25879) but then version 11.0.1 broke it (https://app.circleci.com/pipelines/github/lightstep/ls-trace-js/442/workflows/4556edc7-3195-4beb-8c2b-0a5f77182349/jobs/25926/steps)

@alrosot
Copy link
Author

alrosot commented Jul 26, 2021

Hello dear reviewers 👋
@mwear
@obecny
@codeboten
@tedpennings

Would you have a minute to take a look at this PR? Or maybe #27 ?

@mwear
Copy link

mwear commented Jul 29, 2021

👋 @alrosot We appreciate your efforts to keep this library up to date, but we are in the process of deprecating support for the ls-trace libraries and are encouraging people to use OpenTelemetry in their place. If you have any concerns about migrating to OpenTelemetry, our product team would be happy to chat and better understand your situation. Let me know if you want to set that up

@alrosot
Copy link
Author

alrosot commented Aug 11, 2021

Hi @mwear 👋
Sure. I'm more than happy to port over. I'm trying it already.
And since you offered help, I'd really appreciate that.

I have to get access to B3 headers generated by the lib, and in ls-trace-js I was doing something like:

const ls = require('ls-trace').init({experimental: {b3: true}});
(...)
ls.scope().active().context()._traceId.toString('hex')

According to the docs, I understood the equivalent in OpenTelemetry would be:

const api = require('@opentelemetry/api');
const { B3Propagator, B3InjectEncoding } = require('@opentelemetry/propagator-b3');
api.propagation.setGlobalPropagator(
    new B3Propagator({ injectEncoding: B3InjectEncoding.MULTI_HEADER })
);
(...)
api.getSpan(api.context.active())

But I don't see the headers being generated and api.getSpan is not a function.
Am I properly porting the code?
Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants