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(node-experimental): Ensure we only create HTTP spans when outgoing #8966

Merged
merged 1 commit into from Sep 11, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Sep 7, 2023

This is a fork of #8937, with only the "uncontroversial" stuff, mainly fixing that we only create HTTP breadcrumbs for outgoing requests.

In addition, this also migrates to using requestHook and responseHook instead of applyCustomAttributesOnSpan. We may have to revisit this later, but these hooks seem to have a better context awareness (=they are called in a more reasonable OTEL context, which gives the callbacks there better access to scope data etc). However that means we cannot (easily) pass both request and response as breadcrumb hints - not sure how important that is to us... For now I'd say that's OK.

Note that also requestHook is only called when the request finishes, so we already have all the response OTEL span attributes correctly set there.

@mydea mydea requested review from lforst and Lms24 September 7, 2023 08:13
@mydea mydea self-assigned this Sep 7, 2023
@mydea mydea merged commit 434507d into develop Sep 11, 2023
40 checks passed
@mydea mydea deleted the fn/otel-http-breadcrumb-2 branch September 11, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants