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

[Dynatrace v2] Only serialize metadata when set on the meter #4247

Conversation

pirgeo
Copy link
Contributor

@pirgeo pirgeo commented Oct 16, 2023

(Bugfix)

In #4006, we added support for metrics metadata (unit/description). While working on something unrelated, we realized that the exporter will try to serialize metadata to the Dynatrace transport format. When no metadata is set on the meter (e.g. custom metrics introduced by users) the serialization library will log a warning stating that metadata serialization had been called without setting data. This can lead to many log lines.

Since it is perfectly fine to create meters without metadata, the exporter should not attempt to create metadata lines if no metadata was set on the metric.

jonatan-ivanov added a commit that referenced this pull request Oct 21, 2023
gh-4006 added support for metrics metadata (unit and description) in the
Dynatrace Exporter. The exporter always added the metadata even if unit
or description were not set. After these changes,
the exporter should not attempt to add metadata if no unit
or description was set on the metric.

See gh-4247
See gh-3979
See gh-4006

Co-authored-by: Jonatan Ivanov <jonatan.ivanov@gmail.com>
@jonatan-ivanov jonatan-ivanov added the bug A general bug label Oct 21, 2023
@jonatan-ivanov jonatan-ivanov added this to the 1.12.0 milestone Oct 21, 2023
@jonatan-ivanov
Copy link
Member

Thank you for the PR!
I simplified it a little and added a test: 9df4469

@pirgeo pirgeo deleted the dynatrace-reduce-verbosity branch October 23, 2023 07:12
@shakuzen shakuzen added the registry: dynatrace A Dynatrace Registry related issue label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A general bug registry: dynatrace A Dynatrace Registry related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants