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

feat(metrics): make deleting metrics source metadata optional #3072

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

Conversation

ryan-codaio
Copy link
Contributor

@ryan-codaio ryan-codaio commented May 30, 2023

Currently, there is no way to set the source category for metrics, as we are stripping the _sourceCategory attribute. This happens after the extraProcessors are added, so there is no way to override this behavior. This is pretty important for us, as we need to disambiguate metrics from different environments.

The comment for this delete_source_metadata processor says it's because we need to wait until we can send these attributes as headers, but the sumologic exporter has been doing this since Oct 2022. In tests on our infra with this processor removed, this has been working fine.

I added a configuration parameter defaulting to true to preserve the old behavior by default, to avoid any unexpected surprises with a sudden cardinality increase.

Checklist

  • Changelog updated or skip changelog label added
  • Documentation updated

@ryan-codaio ryan-codaio requested a review from a team as a code owner May 30, 2023 20:23
@github-actions github-actions bot added the documentation documentation label May 30, 2023
@sumo-drosiek
Copy link
Contributor

We are working on improving source metadata for metrics, as it doesn't make sense to use default template for some of them (cluster wide). Workaround for this PR is to use the following configuration:

metadata:
  metrics:
    config:
      merge:
        processors:
          resource/delete_source_metadata:
            attributes:
              # attributes list cannot be empty so using non-existing key
              - key: _
                action: delete

@ryan-codaio
Copy link
Contributor Author

Thank you for the workaround! This seems to have worked well for us.

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

Successfully merging this pull request may close these issues.

None yet

2 participants