-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Migrate receiver creator to internal data model #701
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
Migrate receiver creator to internal data model #701
Conversation
459ef24
to
8879641
Compare
|
||
// This is a copy of go.opentelemetry.io/collector/component/componenttest/example_factories.go | ||
// migrated to internal data model | ||
// TODO: Remove it once this package the one in core updated to support the new data model |
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.
Please create an issue.
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.
8879641
to
a49402b
Compare
@@ -89,7 +91,7 @@ func (r *runnable) Run() error { | |||
ctx := obsreport.ReceiverContext(r.ctx, typeStr, transport, r.receiverName) | |||
for _, md := range mds { | |||
ctx = obsreport.StartMetricsReceiveOp(ctx, typeStr, transport) | |||
err = r.consumer.ConsumeMetricsData(ctx, *md) | |||
err = r.consumer.ConsumeMetrics(ctx, pdatautil.MetricsFromMetricsData([]consumerdata.MetricsData{*md})) |
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.
Please create an issue to change line 89 kubelet.NewMetadata(r.extraMetadataLabels, podsMetadata) to return an array of non pointers to avoid this for loop :)
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.
Fix the lint checks |
c394f1a
to
bac2f34
Compare
bac2f34
to
faf22a6
Compare
a3867c5
to
3b057d6
Compare
Once simple prometheus exporter migrated to internal data model, it cannot be dynamically created anymore. This commit migrate receiver creator to internal data model along with other receivers that can be created dynamically: - kubeletstatsreceiver - redisreceiver The receivers are not migrated completely. For now they use converters. This fixes the currently broken build.
3b057d6
to
daeb40f
Compare
Description:
Once simple prometheus exporter migrated to internal data model, it cannot be dynamically created anymore. This commit migrate receiver creator to internal data model along with other receivers that can be created dynamically:
The receivers are not migrated completely. For now they use converters. This fixes the currently broken build.