-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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] Support connector in metrics.go.tmpl NewMetricsBuilder #12403
base: main
Are you sure you want to change the base?
Conversation
c7f4818
to
bb83847
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (82.60%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #12403 +/- ##
==========================================
- Coverage 92.18% 92.15% -0.04%
==========================================
Files 465 468 +3
Lines 25275 25367 +92
==========================================
+ Hits 23301 23377 +76
- Misses 1575 1589 +14
- Partials 399 401 +2 ☔ View full report in Codecov by Sentry. |
bb83847
to
4355c04
Compare
@Dainerx what other component do you have that emits metrics? |
@bogdandrutu in my use case, processors and connectors do emit metrics. My main concern is the if statement surrounding only the function signature. Also, I expected adding a new class in the metadata schema. |
That should be fixed.
How come? I can see why connectors may do it, but how come the processors? |
Processors can have mutate data capabilities, the metrics generation processor does generate metrics. Although, this is possible, I agree with you it's not a best practice to use a processor to generate metrics. I am fine with only supporting
WDYT? |
4355c04
to
9dded0f
Compare
I am ok with this proposal. |
0a0f205
to
7d5fcd2
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.
I am not sure what changed, but this looks very strange that every line is updated.
7d5fcd2
to
31d7313
Compare
31d7313
to
54a8c7c
Compare
@@ -17,7 +17,7 @@ Examples of this metadata about a component are: | |||
* its stability level | |||
* the distributions containing it | |||
* the types of pipelines it supports | |||
* metrics emitted in the case of a scraping receiver | |||
* metrics emitted in the case of a scraping receiver, a scrapper, or a connector |
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.
* metrics emitted in the case of a scraping receiver, a scrapper, or a connector | |
* metrics emitted in the case of a scraping receiver, a scraper, or a connector |
status: | ||
class: connector | ||
stability: | ||
development: [logs] |
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.
it should look like metrics_to_metrics
for connectors
"go.opentelemetry.io/collector/pdata/pmetric" | ||
) | ||
|
||
// NewFactory returns a receiver.Factory for sample receiver. |
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.
// NewFactory returns a receiver.Factory for sample receiver. | |
// NewFactory returns a connector.Factory for sample connector. |
@@ -0,0 +1,67 @@ | |||
# Sample metadata file with all available configurations for a receiver. |
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.
# Sample metadata file with all available configurations for a receiver. | |
# Sample metadata file with all available configurations for a connector. |
Description
I discovered this issue while trying to upgrade the opentelemetry collector from v0.111.0 to v0.119.0 that was released two weeks ago. To reproduce please take a look at the issue below.
Link to tracking issue
Fixes #12402
Testing
Run
make generate
on a processor or connector component