LukeMathWalker/tracing-actix-web

Feature request: Option to disable the standard OTEL fields

mcronce opened this issue · 5 comments

e.g. otel.name, otel.status_code

I have no strong preference about whether it's a compile-time feature flag, a RootSpanBuilder option, etc - I just want to be able to disable them :)

If you can provide some guidance around what you prefer for implementation, I'd be happy to submit a PR

I'm not interested in supporting this, I'm sorry.

OTEL isn't the only use case for tracing - structured logging is another one, in which the OTEL fields are at best redundant, at worst harmfully noisy. For a crate with a generic name like "tracing-", it would be nice to not have to hard fork to support something like that.

Oh well.

I am sympathetic with the arguments, but due to how tracing works (all fields must be declared when the span is defined and you can have at most 32) introducing this kind of optionality translates into a mess of macro-based code that is cumbersome to read, write and maintain. Or, alternatively, to a bunch of heavily cfg-gated code.

Since I do not currently use this project for my own endeavours, I have no intention to increase the cognitive burden for it.
Introducing this kind of behaviour in a fork is trivial (literally just delete a few lines), so I don't think it's the end of the world :)

just out of curiosity, @LukeMathWalker what do you use for logging in your endeavours ?

I am working on Pavex at the moment!
The observability stack is a work in progress there, as the framework itself.