You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure I'm in the right forum to ask this question, please reroute me if not.
I have a weird case, and I'm at a dead-end, so I'd love an extra pair of eyes to make sure I'm not completely foolish.
I'm trying to add telemetry to varnish. I initially went with the C++ implementation for in-process instrumentation, but varnish vmods don't have access to all the data I'd like (for example, I don't exactly know when a request is restarted, or if something blows up spectacularly).
So, I had an idea: I could use varnish's extensive logging to implement the exporter. I still need to create/propagate traceparent/tracestate HTTP headers in the vmod/vcl, but that's very little work. Now, I just need to read the JSON logs with an external tool, builds spans and just push them to a collector, right?
I thought so, but I can't find a way to force a TraceID/SpanID when creating a Span (or modifying them after creation), which is a problem since the varnish module will already be committed to a pair and will have propagated it already.
I have found IDGenerator which could be what I'm looking for. I could stash the expected TraceID/SpanID in the Context and IDGenerator could just spit them out, but it's starting to become a bit convoluted, and I think I need an adult to check my work before I go too deep in the weeds.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm not sure I'm in the right forum to ask this question, please reroute me if not.
I have a weird case, and I'm at a dead-end, so I'd love an extra pair of eyes to make sure I'm not completely foolish.
I'm trying to add telemetry to varnish. I initially went with the C++ implementation for in-process instrumentation, but varnish vmods don't have access to all the data I'd like (for example, I don't exactly know when a request is restarted, or if something blows up spectacularly).
So, I had an idea: I could use varnish's extensive logging to implement the exporter. I still need to create/propagate
traceparent
/tracestate
HTTP headers in the vmod/vcl, but that's very little work. Now, I just need to read the JSON logs with an external tool, builds spans and just push them to a collector, right?I thought so, but I can't find a way to force a
TraceID
/SpanID
when creating aSpan
(or modifying them after creation), which is a problem since the varnish module will already be committed to a pair and will have propagated it already.I have found IDGenerator which could be what I'm looking for. I could stash the expected
TraceID
/SpanID
in theContext
andIDGenerator
could just spit them out, but it's starting to become a bit convoluted, and I think I need an adult to check my work before I go too deep in the weeds.Beta Was this translation helpful? Give feedback.
All reactions