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

Ensure fastify instrumentation honors the httpParserHook config #287

Merged
merged 1 commit into from
Jan 21, 2021

Conversation

vreynolds
Copy link
Contributor

@vreynolds vreynolds commented Jan 14, 2021

  • add test for this case to both fastify and express instrumentations

Fastify instrumentation was using traceUtils.getTraceContext which does not use httpTraceParserHook configuration.

* add test for this case to both fastify and express instrumentations
@vreynolds vreynolds marked this pull request as ready for review January 14, 2021 23:47
@vreynolds vreynolds requested a review from a team January 14, 2021 23:47
@robbkidd robbkidd changed the title Ensure fastify intrumentation honors the httpParserHook config Ensure fastify instrumentation honors the httpParserHook config Jan 21, 2021
@robbkidd robbkidd added type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible. labels Jan 21, 2021
@@ -72,7 +72,7 @@ const instrumentFastify = function (fastify, opts = {}) {
// start our trace handling

// parse incoming trace headers into a span context
let spanContext = traceUtil.getTraceContext(traceIdSource, request);
let spanContext = traceUtil.parseTraceHeader(traceIdSource, request);
Copy link
Member

Choose a reason for hiding this comment

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

Yay! ✨ consistency ✨

Copy link
Member

@robbkidd robbkidd left a comment

Choose a reason for hiding this comment

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

Getting the hook right!

Captain Hook, how's left hand is a hook, playing the piano.

@vreynolds vreynolds merged commit 2a60646 into main Jan 21, 2021
@vreynolds vreynolds deleted the vera.fastify-trace-parser-hook branch January 21, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants