-
Notifications
You must be signed in to change notification settings - Fork 1.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
[mdatagen] Generate wrappers for recording telemetry metrics #12182
Open
crobert-1
wants to merge
2
commits into
open-telemetry:main
Choose a base branch
from
crobert-1:tel_metric_attributes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+255
−105
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
crobert-1
requested review from
bogdandrutu,
dmitryax and
a team
as code owners
January 25, 2025 00:11
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12182 +/- ##
==========================================
+ Coverage 91.62% 91.65% +0.03%
==========================================
Files 465 465
Lines 24775 24834 +59
==========================================
+ Hits 22699 22761 +62
+ Misses 1687 1685 -2
+ Partials 389 388 -1 ☔ View full report in Codecov by Sentry. |
bogdandrutu
reviewed
Jan 25, 2025
Comment on lines
+102
to
+116
func (builder *TelemetryBuilder) RecordProcessorBatchBatchSendSize(ctx context.Context, val int64, opts ...metric.RecordOption) { | ||
builder.ProcessorBatchBatchSendSize.Record(ctx, val, opts...) | ||
} | ||
|
||
func (builder *TelemetryBuilder) RecordProcessorBatchBatchSendSizeBytes(ctx context.Context, val int64, opts ...metric.RecordOption) { | ||
builder.ProcessorBatchBatchSendSizeBytes.Record(ctx, val, opts...) | ||
} | ||
|
||
func (builder *TelemetryBuilder) RecordProcessorBatchBatchSizeTriggerSend(ctx context.Context, val int64, opts ...metric.AddOption) { | ||
builder.ProcessorBatchBatchSizeTriggerSend.Add(ctx, val, opts...) | ||
} | ||
|
||
func (builder *TelemetryBuilder) RecordProcessorBatchTimeoutTriggerSend(ctx context.Context, val int64, opts ...metric.AddOption) { | ||
builder.ProcessorBatchTimeoutTriggerSend.Add(ctx, val, opts...) | ||
} |
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.
Few things here:
- We will confuse the user when using Add/Record because we don't respect the same semantics as otel.
- What is the next level for this PR? Can you just provide a sketch code that you want to end with, please don't make the code changes, just provide a draft code for me to understand.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is essentially reviving #10911, the first step towards #10801. The goal is to be able to use
mdatagen
to handle more use cases around telemetry metrics, similar to regular metrics, especially to be able to set attributes on the telemetry metrics.Link to tracking issue
Part of #10801
Testing
Code has been generated for different telemetry metric types, existing tests use this behavior pretty heavily.