Building a Trace => Meter firehose #5129
Replies: 1 comment 2 replies
-
You may find it easier to use OTelCollector to build a Span->Metrics pipeline (assuming you can use Collector). If trying to do this in-proc completely, you need to write custom sampler, to ensure Activity is always created (so that the processor can see it, and generate metrics out of it), but not exported (so as to keep your costs in control). AzureMonitor is doing the above if you want to take a look.( Warning: it is very custom to Azure, so you'll have to do a lot of customizations, but the idea is borrowable) |
Beta Was this translation helpful? Give feedback.
-
Hey All!
I am utilising metrics for some pretty useful things, as such as getting a count of failed vs successful requests over given time spans and I wanted to improve this to also record metrics of successful/failed Azure Cosmos requests.
Now the Azure SDK does provide traces for consumption, however I cannot find a way to convert a stream of traces into metrics... I have created a
BaseProcessor<Activity>
POC which overrides OnEnd and dumps the source name, which does work HOWEVER I am unable to have both a sampled set of data sent off to my Otel backing services AND also have my Processor receive all incoming Traces.Is there some way to take all the incoming Traces and pipe them through some form of processor/hose/middleware that would allow me to push out metrics?
Note: Very long day, will attempt to re-word this OR clarify things in the morning
Beta Was this translation helpful? Give feedback.
All reactions