admin管理员组文章数量:1435254
I have a .NET webservice that writes logs and metrics to an OpenTelemetry endpoint.
I have Telegraf configured with an OpenTelemetry input, and an InfluxDB output.
So far so good ... all the logging and tracing (spans) are getting picked up by Telegraf and pushed to an InfluxDB bucket, and I can see them all using simple SELECT
statements.
My question relates to the format of the resulting database entries, which seem to be in tables that conform to OpenTelemetry data models. The tables contain a string column called attributes
, which seems to contain all the "interesting" bits of the entry (e.g. any IDs, context, etc) all wrapped up in a big JSON string. Here's an example from the log table:
{"EventId":"{ Id: 262679994, Name: \"NameOfLoggingEvent\" }","SourceContext":"Name.Of.Class.That.Log.Was.Made.From","emailId":"big_id_string","telemetry.sdk.language":"dotnet","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.8.0"}
So that's great, but how would I go about querying these entries? For example, if I wanted to query all entries pertaining to a particular emailId
, or with a particular SourceContext
? As far as I can see, there is no way to query JSON content in InfluxDB?
Is InfluxDB a bad choice for the output?
Or is there a way to "break out" the attributes into separate columns using a Telegraf processor? (I had a look, but didn't see much scope for doing that)
If anyone could offer some best-practice advice, I'd be very grateful.
本文标签: open telemetryTelegrafInfluxDBOpenTelemetry and querying logsStack Overflow
版权声明:本文标题:open telemetry - Telegraf, InfluxDB, OpenTelemetry and querying logs - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1740299510a2257286.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论