Skip to content
New issue

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

fix: introduce pino mixin function to handle trace/span id injection issue #163

Merged
merged 4 commits into from
Jun 27, 2024

Conversation

wrn14897
Copy link
Contributor

@wrn14897 wrn14897 commented Jun 27, 2024

Issue

The pino instrumentation won't work (https://www.npmjs.com/package/@opentelemetry/instrumentation-pino) with programmatic import. it seems tricky to attach span/trace id on the transport layer due to the async stream implementation.

Solution

Giving user the custom mixin function which attaches span/trace id

Copy link

changeset-bot bot commented Jun 27, 2024

🦋 Changeset detected

Latest commit: 1360427

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hyperdx/node-opentelemetry Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@colehpage colehpage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment on lines -28 to +29
const pino = require('pino');
const winston = require('winston');
const pino = require('pino');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

key change 😉 💪

@kodiakhq kodiakhq bot merged commit f84fd61 into main Jun 27, 2024
3 checks passed
@kodiakhq kodiakhq bot deleted the warren/introduce-pino-mixin-function branch June 27, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants