rig icon indicating copy to clipboard operation
rig copied to clipboard

feat: Otel is too verbose and expensive

Open Sytten opened this issue 1 month ago • 3 comments

  • [ ] I have looked for existing issues (including closed) about this

Feature Request

Make the Otel records configurable.

Motivation

Otel is adding a lot of crap to spans which reflect in all the http debug logs after that, quite annoying and can leak PII (specially the messages). It is also costly to do a bunch of JSON serialization all the time (I did partially fix that in #1052)

Proposal

I am not a tracing expert, I don't really know if it is possible to disable recording fields. Otherwise it could be a feature flag.

Alternatives

I guess the consumer can filter those?

Sytten avatar Nov 16 '25 20:11 Sytten

RIG-1044

linear[bot] avatar Nov 16 '25 20:11 linear[bot]

Yeah we should probably add a feature flag or way to configure this. It's been low priority for a while but I think a way to configure this would not go amiss

joshua-mo-143 avatar Nov 17 '25 10:11 joshua-mo-143

I will need to dig more on how to do that. I think we might need a dynamic configuration for it per model or something if we want targeted thing.

Sytten avatar Nov 17 '25 23:11 Sytten

Had a look into this.

As far as I'm concerned from what I have discovered, the message logging in GenAI SemConv is optional - so we should be safe to remove the message logging from spans without any worry as it adds an extremely high amount of cardinality. We should probably prefer the messages/requests to be in logs, instead.

This is probably the millionth breaking change we've made, but it's likely a correct one given that not everyone (read: almost nobody at all) needs the entire message history in their span telemetry.

joshua-mo-143 avatar Dec 02 '25 17:12 joshua-mo-143