-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add self-observability metrics to otlpmetricgrpc metric exporters #7120
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
base: main
Are you sure you want to change the base?
feat: add self-observability metrics to otlpmetricgrpc metric exporters #7120
Conversation
internal/shared/otlp/otlpmetric/selfobservability/selfobservability.go.tmpl
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7120 +/- ##
======================================
Coverage 82.9% 82.9%
======================================
Files 264 266 +2
Lines 24628 24779 +151
======================================
+ Hits 20425 20561 +136
- Misses 3820 3832 +12
- Partials 383 386 +3
🚀 New features to boost your workflow:
|
@pellared I've tried to fix the CI pipeline failures, please review this PR and re-trigger the pipeline check. |
@minimAluminiumalism, can you please make the documentation and changelog entry similar to other modules? You can take a look at #7121 for another reference. |
The changelog and doc.go have been modified. |
internal/shared/otlp/otlpmetric/selfobservability/selfobservability.go.tmpl
Outdated
Show resolved
Hide resolved
internal/shared/otlp/otlpmetric/selfobservability/selfobservability.go.tmpl
Outdated
Show resolved
Hide resolved
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/selfobservability.go
Show resolved
Hide resolved
Since this PR includes 2 components, I suggest implementing one of them first, as it will be easier to get through during both implementation and review. |
As a supplementary note (which might be useful), when conducting unit tests for metrics, we can use this package: https://github.com/open-telemetry/opentelemetry-go/tree/main/sdk/metric/metricdata/metricdatatest In fact, I haven't started the review of unit tests yet. (Reason: The functional part has not yet been fully reviewed). |
I've removed the implementation of otlpmetrichttp, please review it. |
...otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/template/selfobservability.go.tmpl
Outdated
Show resolved
Hide resolved
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.
The functional components have been largely reviewed, and unit testing has not yet commenced.
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/selfobservability.go
Outdated
Show resolved
Hide resolved
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.
The functional part is basically in line with expectations, requiring only minor adjustments.
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/selfobservability.go
Outdated
Show resolved
Hide resolved
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.
Review based on unit testing
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/selfobservability_test.go
Outdated
Show resolved
Hide resolved
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/selfobservability_test.go
Outdated
Show resolved
Hide resolved
exporters/otlp/otlpmetric/otlpmetricgrpc/selfobservability_test.go
Outdated
Show resolved
Hide resolved
exporters/otlp/otlpmetric/otlpmetricgrpc/internal/selfobservability/selfobservability.go
Outdated
Show resolved
Hide resolved
exporters/otlp/otlpmetric/otlpmetricgrpc/selfobservability_test.go
Outdated
Show resolved
Hide resolved
exporters/otlp/otlpmetric/otlpmetricgrpc/selfobservability_test.go
Outdated
Show resolved
Hide resolved
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.
Thank you for your contribution.
@flc1125 Conflicts resolved, re-run the pipeline please :) |
@flc1125 Maybe it's time to merge this PR? I'll implement it of |
Sorry, I was on vacation last week, and there have been some significant recent changes that I need to review. |
Please use this component https://github.com/open-telemetry/opentelemetry-go/tree/main/exporters/stdout/stdouttrace as a reference; there have been some recent optimizations, and we need to adjust accordingly. You can view the change log via this link: https://github.com/open-telemetry/opentelemetry-go/commits/main/exporters/stdout/stdouttrace Please refer to the adjustment for this range: 2ab7d4d...c2a6172 |
Hi, since this process involves specification adjustments and historical review records (which may contain invalid review suggestions), it’s impossible to tell which items need attention amid the large volume of information. Could we create a new PR based on the current branch before preparing for the review, so that subsequent reviews can proceed more smoothly? Thanks~ |
Fixes #7012
internal/selfobservability
package to gRPC exportersotel.sdk.exporter.metric_data_point.inflight
(UpDownCounter)otel.sdk.exporter.metric_data_point.exported
(Counter)otel.sdk.exporter.operation.duration
(Histogram)