Hummingbird v0.0.8 Hummingbird View Source
Ships the conn to honeycomb.io to allow distributed tracing.
Assumes requests that come in populate two different headers: x-b3-traceid and x-b3-spanid
Link to this section Summary
Functions
Wraps the conn in what honeycomb craves for beeeeee processing Many things are in the conn and duplicated here. The reason is by normalizing the output here, we can tell honeycomb to always look in the same place for user events. They don't (afaik) have an easy ability to translate different shapes of events on their side
An impure dispatching of conn information to the elixir honeycomb client
If a span has already been created for this conn, just use that as the parent.
Grabs the trace id sent over from initiating request. If nah, starts a trace for within this application.
Callback implementation for Plug.init/1
.
Produces a random span ID.
Produces a random trace ID.
Link to this section Functions
Wraps the conn in what honeycomb craves for beeeeee processing Many things are in the conn and duplicated here. The reason is by normalizing the output here, we can tell honeycomb to always look in the same place for user events. They don't (afaik) have an easy ability to translate different shapes of events on their side
For example: booked_by:
is a different actor location than the assigns for
a conn.
Warning: this is a mix of translating on the way out to OpenCensus+Honeycomb language. Don't know enough at this moment to disambiguate the two languages.
An impure dispatching of conn information to the elixir honeycomb client
If a span has already been created for this conn, just use that as the parent.
If not, check the headers for a span_id to hold onto and use that as your parent_id. The latter occurs when taking in IDs from external contexts, read: commands.
If neither are set, this span should not have a parent.
Grabs the trace id sent over from initiating request. If nah, starts a trace for within this application.
Callback implementation for Plug.init/1
.
Produces a random span ID.
Produces a string of lowercase hex-encoded characters of length 16 by default.
Produces a random trace ID.
Follows the same generation rules as a span ID, but 32 characters are used instead of 16.