-
Notifications
You must be signed in to change notification settings - Fork 20
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
Reduce dependency on MetricsLevel throughout otel-arrow #283
Merged
jmacd
merged 6 commits into
open-telemetry:main
from
drewrelmas:drewrelmas/remove-leveldetailed
Jan 24, 2025
Merged
Reduce dependency on MetricsLevel throughout otel-arrow #283
jmacd
merged 6 commits into
open-telemetry:main
from
drewrelmas:drewrelmas/remove-leveldetailed
Jan 24, 2025
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
jmacd
reviewed
Jan 24, 2025
Comment on lines
+448
to
+458
var bytes int | ||
bpt := b.processor.telemetry | ||
|
||
// Check if the instrument is enabled to calculate the size of the batch in bytes. | ||
// See https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric/internal/x#readme-instrument-enabled | ||
batchSendSizeBytes := bpt.telemetryBuilder.ProcessorBatchBatchSendSizeBytes | ||
instr, ok := batchSendSizeBytes.(interface{ Enabled(context.Context) bool }) | ||
if !ok || instr.Enabled(bpt.exportCtx) { | ||
bytes = b.batch.sizeBytes(req) | ||
} | ||
b.processor.telemetry.record(trigger, int64(sent), bytes) | ||
|
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 see you followed the upstream branch here. Thanks. (I don't love this, but I want it to stay close to the upstream!)
jmacd
approved these changes
Jan 24, 2025
Merged
jmacd
pushed a commit
that referenced
this pull request
Jan 24, 2025
- Make a generic `AttributesStore` in pkg/arrow. [#276](#276) - Update to v0.117.0 collector dependencies. [#277](#277), [#279](#279) - Deprecate local versions of `fileexporter` and `filereceiver` in favor of upstream components with related README changes. [#278](#278) - Made an incremental step towards deprecating `MetricsLevel` usage in the project. [#283](#283)
jmacd
pushed a commit
that referenced
this pull request
Feb 6, 2025
…119.0 (#287) Related to #280, follow-up to #283 and open-telemetry/opentelemetry-collector-contrib#37512. Now that the Collector-Contrib `otelarrowreceiver` in release v0.119.0 uses the `WithMeterProviderAlt` function, it is safe to change the signature of `WithMeterProvider` to follow through on the deprecation of `MetricsLevel`. After another otel-arrow release and subsequent contrib release, will remove the `Alt` function entirely. Finally, updated the `mdatagen` result in `concurrentbatchprocessor` to reflect the additional deprecation of `MetricsLevel` following upstream activity at https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor.
6 tasks
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.
Related to issue #280
Also see open-telemetry/opentelemetry-collector#11061 and open-telemetry/opentelemetry-collector#12143
There is a movement to remove
MetricsLevel
from the Collector'sTelemetrySettings
, which is used explicitly in various places in the otel-arrow project.In addition to the 'dead code' identified in #280, this PR aims to remove other instances of reference to
MetricsLevel
.In one case this is not currently possible because a component in
opentelemetry-collector-contrib
depends on anotel-arrow arrow_record
function signature includingMetricsLevel
, see otelarrowreceiver. Instead, introduced a temporaryWithMeterProviderAlt
without that paramater that should become the new default implementation once the Contrib component is updated accordingly.