Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: stop reporting metrics in client transport #43

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dhontecillas
Copy link
Contributor

When there is no opentelemetry config provided, we default to report traces and metrics it there is an exporter configured.
However, if some property of a config is provided, those reporting by default do not apply and you must explicitly set what you want to be reported.

In the case of the transport, there was a bug, that was checking if either traces or metrics were enabled to instrument the client. That means that, if traces were enabled but not metrics, we would report both of them (or the other way around).

That also leads to an "unexpected behaviour" : if we only configure static attributes (either for metrics or traces) and we do not set the other options, the config still results in not instrumenation enabled. And if we provide static_attributes for one of them (for example metrics) , it ends disables, but if we do not provide any configuration at all for the other (for example traces), due to this bug, the metrics get reported with the provided attributes.

This fixes this behaviour. But still, it might be "unexpected" to provide static attributes, but having the instrumentation disabled for no providins something like "round_trip": true in the same config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant