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

[chore] refactor mdatagen loader code #29926

Merged

Conversation

codeboten
Copy link
Contributor

This allows us to support all component types via a map. This will be used when adding the Meter func in mdatagen to produce consistent scope names for other components than receivers/scrapers.

This allows us to support all component types via a map. This will be used when adding the Meter func in mdatagen to produce consistent scope names for other components than receivers/scrapers.

Signed-off-by: Alex Boten <[email protected]>
Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This not only refactoring, right? we need to introduce scope for other types?

cmd/mdatagen/loader.go Show resolved Hide resolved
@codeboten
Copy link
Contributor Author

codeboten commented Dec 15, 2023

This not only refactoring, right? we need to introduce scope for other types?

@dmitryax right, this will introduce scope for other components, which is then used in this PR #29927.

It's refactoring in the sense that nothing changes in the generated code that exists today.

bogdandrutu pushed a commit that referenced this pull request Dec 18, 2023
This PR adds methods to `generated_status` that returns a Meter/Tracer
w/ the scopeName set for each component. I'm not set on where to put
this method, added it to generated_status but could easily be in a
generated_telemetry.go file as well.

Follows
#29926

Fixes
#29921

---------

Signed-off-by: Alex Boten <[email protected]>
@bogdandrutu bogdandrutu merged commit e54b69e into open-telemetry:main Dec 18, 2023
86 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 18, 2023
@codeboten codeboten deleted the codeboten/add-meter-mdatagen-method branch December 18, 2023 20:57
cparkins pushed a commit to AmadeusITGroup/opentelemetry-collector-contrib that referenced this pull request Jan 10, 2024
…-telemetry#29927)

This PR adds methods to `generated_status` that returns a Meter/Tracer
w/ the scopeName set for each component. I'm not set on where to put
this method, added it to generated_status but could easily be in a
generated_telemetry.go file as well.

Follows
open-telemetry#29926

Fixes
open-telemetry#29921

---------

Signed-off-by: Alex Boten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/mdatagen mdatagen command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants