-
Notifications
You must be signed in to change notification settings - Fork 1
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
rewrite focusing on telemetry #21
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a lot...
i approve
|> put_req_header("x-b3-spanid", UUID.uuid4()) | ||
|> put_req_header("x-b3-traceid", UUID.uuid4()) | ||
|> put_req_header("x-b3-sampled", "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@the-mikedavis Only real concern here is that Defer
sampling is done by absence of this header. 0
is deny and that seems ham-handed.
It makese sense to me to have each app have ownership of how it wants to set sampling or nah, especially since it should be able to trace according to its own rules. If it wants to make another trace, and link the two traces, that's its perogative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this header is just for the test though. there's another line somewhere setting the default when deferred to be true or "1"
but I agree that should be configurable on a per app basis. something like config :hummingbird, sample_when_deferred: true|false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦 my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#22 made a little issue for it here
phoenix emits a telemetry event when it finishes a run with a conn and on that telemetry event is the conn and duration (exactly what we need)
so this PR changes the
Hummingbird
plug to solely determine trace IDs and put them intoconn.private.hummingbird
along with other metadatawhen the telemetry event comes along, it'll trigger a telemetry handler
Hummingbird.Telemetry
(put that in your application sup tree) which will handle the sending of events to honeycomb and grabbing of metadata from the conna few other things:
events: []
inconn.private.hummingbird