[collector/netstats] Move span API calls into Count methods#201
Merged
Conversation
codeboten
referenced
this pull request
in open-telemetry/opentelemetry-collector-contrib
Jun 11, 2024
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [github.com/open-telemetry/otel-arrow](https://github.com/open-telemetry/otel-arrow) | `v0.23.0` -> `v0.24.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>open-telemetry/otel-arrow (github.com/open-telemetry/otel-arrow)</summary> ### [`v0.24.0`](https://github.com/open-telemetry/otel-arrow/releases/tag/v0.24.0) [Compare Source](https://github.com/open-telemetry/otel-arrow/compare/v0.23.0...v0.24.0) Jitter is applied to once per process, not once per stream. [https://github.com/open-telemetry/otel-arrow/pull/199](https://github.com/open-telemetry/otel-arrow/pull/199) Network statistics tracing instrumentation simplified. [https://github.com/open-telemetry/otel-arrow/pull/201](https://github.com/open-telemetry/otel-arrow/pull/201) Protocol includes use of more gRPC codes. [https://github.com/open-telemetry/otel-arrow/pull/202](https://github.com/open-telemetry/otel-arrow/pull/202) Receiver concurrency bugfix. [https://github.com/open-telemetry/otel-arrow/pull/205](https://github.com/open-telemetry/otel-arrow/pull/205) Concurrent batch processor size==0 bugfix. [https://github.com/open-telemetry/otel-arrow/pull/208](https://github.com/open-telemetry/otel-arrow/pull/208) New integration testing. [https://github.com/open-telemetry/otel-arrow/pull/210](https://github.com/open-telemetry/otel-arrow/pull/210) Use gRPC Status codes in the Arrow exporter. [https://github.com/open-telemetry/otel-arrow/pull/211](https://github.com/open-telemetry/otel-arrow/pull/211) Fix stream-shutdown race in Arrow receiver. [https://github.com/open-telemetry/otel-arrow/pull/212](https://github.com/open-telemetry/otel-arrow/pull/212) Avoid work for already-canceled requests. [https://github.com/open-telemetry/otel-arrow/pull/213](https://github.com/open-telemetry/otel-arrow/pull/213) Call IPCReader.Err() after reader loop. [https://github.com/open-telemetry/otel-arrow/pull/215](https://github.com/open-telemetry/otel-arrow/pull/215) Update to Arrow-Go v16.1.0. [https://github.com/open-telemetry/otel-arrow/pull/218](https://github.com/open-telemetry/otel-arrow/pull/218) Update to OpenTelemetry Collector v0.102.x. [https://github.com/open-telemetry/otel-arrow/pull/219](https://github.com/open-telemetry/otel-arrow/pull/219) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "on tuesday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-telemetry/opentelemetry-collector-contrib). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTMuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZWJvdCJdfQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Co-authored-by: Yang Song <songy23@users.noreply.github.com>
This file contains hidden or 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
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.
This is a simplification.
We can instrument the same information with fewer API calls, and I had encountered this as a readability problem in the exporter / receiver. Since CountSend and CountReceive already see the four parameters correctly, and since the Span already has a name indicative of whether it is exporter or receiver, we can report the span attributes from inside the Count methods using fixed attribute names.
The exporter and receiver code avoids use of MetricsLevel to gate calls into the netstats code, so that span instrumentation is independent of metrics detail. Netstats is level-aware, so this is not a change in observability.
To avoid complicating release cycles with collector-contrib, I've left behind a no-op interface which can be removed after several release cycles.