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

[receiver/hostmetrics] Remove redundant usages of metadata.Attribute #9753

Conversation

dmitryax
Copy link
Member

@dmitryax dmitryax commented May 5, 2022

metadata.Attributes is not needed in the new metrics builder to build metrics and can be removed.

This change removes redundant usages of that structure from hostmetrics receiver.

  • Usage in filesystemscraper/config.go is just incorrect.
  • Usage of the metadata.Attributes in tests should be replaced with strings to make the tests more independent from metrics builder generator.

Link to tracking Issue: #8842

@dmitryax dmitryax added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 5, 2022
@dmitryax dmitryax requested review from a team and mx-psi May 5, 2022 17:06
metadata.Attributes is not needed in the new metrics builder to build metrics and can be removed.

This change removes redundant usages of that structure from hostmetrics receiver. 
- 1 usage in filesystemscraper/config.go is just incorrect.
- Usage of the metadata.Attributes in tests should be replaced with strings to make the tests more independent from metrics builder generator.
@dmitryax dmitryax force-pushed the hostmetrics-remove-attribute-definition branch from ee3c439 to 65b99e8 Compare May 5, 2022 17:22
@djaglowski djaglowski merged commit 055926a into open-telemetry:main May 5, 2022
djaglowski pushed a commit to djaglowski/opentelemetry-collector-contrib that referenced this pull request May 10, 2022
…pen-telemetry#9753)

metadata.Attributes is not needed in the new metrics builder to build metrics and can be removed.

This change removes redundant usages of that structure from hostmetrics receiver. 
- 1 usage in filesystemscraper/config.go is just incorrect.
- Usage of the metadata.Attributes in tests should be replaced with strings to make the tests more independent from metrics builder generator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants