-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[Metrics builder] Move resource creation to the generated code #8555
[Metrics builder] Move resource creation to the generated code #8555
Conversation
3b3ca32
to
7592d08
Compare
@djaglowski @codeboten please let me know what do you think about this approach to #8358 |
7592d08
to
0de3ef7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall I think this looks really good. Just a couple of things that need to be fixed w/ the generated documentation.
223c967
to
65e550b
Compare
receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go
Show resolved
Hide resolved
receiver/rabbitmqreceiver/internal/metadata/generated_metrics_v2.go
Outdated
Show resolved
Hide resolved
65e550b
to
abb36f4
Compare
3806dc6
to
543ffd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This is a really nice solution to two problems.
This change updates metrics builder to fully control creation of the metrics object. Scraper author don't need to create pdata.Metrics object and pass it to MetricsBuiler.Emit function. This change also moves definition of resource attributes to metadata.yaml which is used to generate attribute helper that can be used in the scraper. 313873
543ffd2
to
85da9de
Compare
This change updates metrics builder to fully control creation of the
pdata.Metrics
object, scraper author don't need to create and pass it toMetricsBuiler.Emit
function anymore.This change also moves definition of resource attributes to metadata.yaml which is used to generate attribute helper that can be used in the scraper.
Closes: #8358
Also this is the first PR towards #7301.
The following items will be resolved as follow-up PRs:
wrapBySchemaURLSetterConsumer