[API/SDK] feat: exemplar filters#4191
Closed
proost wants to merge 50 commits into
Closed
Conversation
…to feat-exemplar-filters
There was a problem hiding this comment.
Pull request overview
This PR completes exemplar filtering by moving filter decisions into a FilteredExemplarReservoir wrapper (instead of scattering filter checks across metric storage code), and updates the logs SDK to reuse a new trace::GetSpanContext() helper for extracting the active span context from a Context.
Changes:
- Add
FilteredExemplarReservoirand wire exemplar filter behavior throughExemplarReservoirfactories (GetSimpleFilteredExemplarReservoir,GetExemplarReservoir). - Remove exemplar-filter branching from sync/async metric storages and update meter/storage call sites accordingly.
- Add
trace::GetSpanContext()API helper, use it in logs SDK, and update/remove related tests/build targets.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| sdk/include/opentelemetry/sdk/metrics/state/sync_metric_storage.h | Removes in-storage exemplar filtering; always forwards to reservoir (filter now handled by reservoir wrapper). |
| sdk/include/opentelemetry/sdk/metrics/state/async_metric_storage.h | Removes in-storage exemplar filtering; always forwards to reservoir (filter now handled by reservoir wrapper). |
| sdk/include/opentelemetry/sdk/metrics/exemplar/filtered_exemplar_reservoir.h | Adds the filtering reservoir wrapper that enforces ExemplarFilterType. |
| sdk/src/metrics/exemplar/reservoir.cc | Implements GetSimpleFilteredExemplarReservoir() factory creating the wrapper reservoir. |
| sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir.h | Updates filtered-reservoir factory signature to use nostd::shared_ptr. |
| sdk/include/opentelemetry/sdk/metrics/exemplar/reservoir_utils.h | Wraps concrete reservoirs (fixed-size / aligned histogram) with filtered reservoir based on configured filter type. |
| sdk/src/metrics/meter.cc | Passes exemplar filter type into GetExemplarReservoir(...) so storages receive already-filtering reservoirs. |
| api/include/opentelemetry/trace/context.h | Adds trace::GetSpanContext(context) helper for extracting active SpanContext from a Context. |
| sdk/src/logs/logger.cc | Replaces duplicated span-context extraction helper with trace::GetSpanContext(). |
| sdk/test/metrics/exemplar/filtered_exemplar_reservoir_test.cc | Adds unit coverage for AlwaysOn/AlwaysOff/TraceBased behavior in the filtered reservoir wrapper. |
| sdk/test/metrics/exemplar/CMakeLists.txt | Registers the new filtered-reservoir test target. |
| sdk/test/metrics/exemplar/BUILD | Adds Bazel cc_test for filtered_exemplar_reservoir_test. |
| sdk/test/metrics/exemplar/always_sample_filter_test.cc | Removes old ExemplarFilter interface-based test (API removed/changed). |
| sdk/test/metrics/exemplar/with_trace_sample_filter_test.cc | Removes old ExemplarFilter interface-based test (API removed/changed). |
| sdk/test/metrics/sync_metric_storage_counter_test.cc | Updates SyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| sdk/test/metrics/sync_metric_storage_up_down_counter_test.cc | Updates SyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| sdk/test/metrics/sync_metric_storage_histogram_test.cc | Updates SyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| sdk/test/metrics/sync_metric_storage_gauge_test.cc | Updates SyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| sdk/test/metrics/async_metric_storage_test.cc | Updates AsyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| sdk/test/metrics/cardinality_limit_test.cc | Updates SyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| sdk/test/metrics/bound_sync_instruments_test.cc | Updates SyncMetricStorage construction for changed exemplar args (filter removed from ctor). |
| CHANGELOG.md | Documents new trace::GetSpanContext() and exemplar filter application via filtered reservoirs. |
dbarker
reviewed
Jul 15, 2026
dbarker
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR. I haven't reviewed fully but wanted to share this initial feedback on breaking out the GetSpanContext method to a separate PR.
3 tasks
proost
added a commit
to proost/opentelemetry-cpp
that referenced
this pull request
Jul 18, 2026
Per review on open-telemetry#4191, GetSpanContext() will land in its own PR and replace the GetSpan(ctx)->GetContext() pattern codebase-wide. Remove it here: revert the api/trace/context.h addition and the logs logger.cc dedup (restoring ExtractSpanContextFromContext), and use the existing trace::GetSpan(context)->GetContext() in the exemplar TraceBased filter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
* [SDK] LogRecord attribute limits enforcement Apply attribute count and value length limits described by the logs SDK spec (https://opentelemetry.io/docs/specs/otel/logs/sdk/#logrecord-limits) during attribute writes. Limits flow from LoggerProvider through LoggerContext to each LogRecord created by Logger::CreateLogRecord. * Add LogRecordLimits struct with spec defaults: attribute_count_limit = 128 and attribute_value_length_limit = SIZE_MAX (unlimited). * Recordable gains a virtual SetLogRecordLimits with a no-op default so existing implementations need not change. ReadableLogRecord gains a virtual GetDroppedAttributesCount returning zero by default. * ReadWriteLogRecord and OtlpLogRecordable enforce the limits in SetAttribute. An attribute beyond attribute_count_limit is dropped and counted as dropped; string and string-array values whose byte length exceeds attribute_value_length_limit are truncated. Truncation is byte-level, mirroring the existing Span attribute behavior. The OTLP path also populates dropped_attributes_count on the proto LogRecord. * MultiRecordable propagates the limits to every wrapped recordable. * LoggerContext owns a LogRecordLimits value; Logger calls SetLogRecordLimits on the recordable returned by MakeRecordable before any user attribute writes. A new LoggerProviderFactory::Create overload accepts LogRecordLimits. * The declarative configuration path (SdkBuilder) wires LogRecordLimitsConfiguration to the runtime LogRecordLimits. Tests cover ReadWriteLogRecord and OtlpLogRecordable: defaults, count enforcement (including the "replace existing key while at limit must not drop" case), length truncation of strings and string arrays, type selectivity (only string and array-of-string are truncated), the combined count plus length case, and a Logger-level wiring test that verifies the limits configured on LoggerProvider reach the recordable returned by Logger::CreateLogRecord. Fixes open-telemetry#4126 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: address review (store by value, OTLP UTF-8-aware truncate) Address three review comments from @lalitb on PR open-telemetry#4157, plus a follow-up from @owent (r3434178971). 1. Store LogRecordLimits by value inside ReadWriteLogRecord and OtlpLogRecordable instead of a raw pointer to a LoggerContext-owned object. A LogRecord is handed out as a unique_ptr, so a record outliving the context that produced it would otherwise dereference a dangling pointer when the user calls SetAttribute() later. The default-constructed value already carries the spec defaults (count=128, length=unlimited), so a fresh recordable enforces the spec count cap from construction, matching the PR's "enforcement" contract. 2. Drop the now-redundant `limits_ != nullptr` short-circuit at every enforcement site (4 in total). This also closes the Codecov-reported uncovered branch in otlp_log_recordable.cc. 3. Truncate OTLP string attributes at a UTF-8 code-point boundary instead of a raw byte boundary, so the protobuf string_value produced by truncation stays valid UTF-8 when the input was. Malformed UTF-8 and trailing lead bytes degrade to plain byte truncation. Logic adapted from open-telemetry#4132 with attribution. The SDK-side ReadWriteLogRecord truncation stays as plain byte cut. The in-memory `OwnedAttributeValue::std::string` variant may legitimately carry raw bytes when constructed from a non-UTF-8 source, so forcing UTF-8 boundary semantics there would over-truncate that case (per @owent's r3434178971, echoing the same point on open-telemetry#4132 r3409677314). Each recordable's truncation strategy now matches its own consumer's wire-format requirement: SDK in-memory has no wire requirement, OTLP protobuf requires valid UTF-8. While in the same truncation paths, also apply the byte-length cap to raw bytes attributes (`vector<uint8_t>` on the SDK side, AnyValue `bytes_value` on the OTLP side). Both were previously passing through any size, even though the spec applies `attribute_value_length_limit` to bytes attributes as well. Test changes: - Rename DefaultsPassThroughWithoutLimitsObject to DefaultRecordEnforcesSpecCountCap (200 attrs in, 128 stored, 72 dropped) to reflect the new spec-correct default behavior. - Add bytes-truncation tests on both SDK and OTLP sides. - Add 3 UTF-8 regression tests on the OTLP side only (split prevention, exact fit at sequence boundary; malformed-fallback omitted since the algorithm's seq=1 fallback for invalid continuations is implementation detail rather than wire contract). - Add a default-cap test on the OTLP side. Refs: open-telemetry#4126 Co-authored-by: Hyeonho Kim <proost@apache.org> Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: address dbarker review (extract utilities, dedupe SetAttribute lookup) Address @dbarker's three review comments on PR open-telemetry#4157. * r3442854800: Extract Utf8SafePrefixLength and TruncateProtoAttributeValue from the anonymous namespace in otlp_log_recordable.cc into OtlpPopulateAttributeUtils as static methods, with new direct unit tests in otlp_populate_attribute_utils_test.cc. The upcoming SpanLimits PR will reuse these from the OTLP trace recordable. The OTLP helper that was previously TruncateProtoStringValue is renamed TruncateProtoAttributeValue to reflect that it covers string_value, bytes_value, and array_value branches. * r3443005793: Extract the SDK byte-length truncation helper into sdk::common::TruncateAttributeValueByteLength (inline, declared in the existing sdk/common/attribute_utils.h), with new direct unit tests in attribute_utils_test.cc. The upcoming SpanLimits PR will reuse this from ReadWriteSpanData. The new name reflects that the helper covers string, string-array, AND bytes variants rather than only strings. * r3443034336: Rewrite ReadWriteLogRecord::SetAttribute to use a single unordered_map lookup. The previous code did .find() to gate the count cap, then operator[] to fetch-or-insert; the new code does .find() followed by conditional .emplace(), so existing-key replacement and new-key insertion each cost one hash lookup. Refs: open-telemetry#4126 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: fix noexcept correctness + restore Bazel link Two small fixes on top of c4532cd: * Address @dbarker's r3444034234: rewrite sdk::common::TruncateAttributeValueByteLength to dispatch on the variant via nostd::get_if (returns nullptr if the alternative does not hold) instead of nostd::holds_alternative + nostd::get. The helper is declared noexcept; nostd::get throws when the alternative does not match, which would invoke std::terminate even though the preceding holds_alternative check makes that path unreachable in practice. The get_if rewrite removes the throwing call entirely so the noexcept contract is statically honored. * Restore the Bazel link of the new otlp_populate_attribute_utils_test target by adding //sdk/src/metrics to its deps, matching the existing otlp_log_recordable_test target. The new test target links against :otlp_recordable, which transitively references sdk::metrics::AdaptingCircularBufferCounter symbols; Bazel's strict layering requires the dep to be declared at the cc_test level. CMake did not catch this because its default link aggregates the whole library. Refs: open-telemetry#4126 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: fix MSVC variable shadow + drop dead includes + clang-tidy NOLINT Three CI failure classes surfaced after the branch-update merge of main into the PR branch (ccdd5e9). Address each: * MSVC C2220 (warning-as-error) on attribute_utils.h:93 — the `for (auto &s : *vec)` loop inside TruncateAttributeValueByteLength shadowed the `if (auto *s = get_if<std::string>(...))` on line 84. GCC/Clang accept if-init scoping for the two `s`, MSVC /W4 /WX treats C4456 (declaration hides previous local) as an error. Rename the loop variable to `element` to remove the shadow. * IWYU drop four includes that the v3+v4 utility-extraction refactor made redundant: - sdk/src/logs/read_write_log_record.cc: <vector> - exporters/otlp/src/otlp_log_recordable.cc: <string> - exporters/otlp/test/otlp_populate_attribute_utils_test.cc: <cstddef> and <limits> * clang-tidy abiv2-preview misc-no-recursion on OtlpPopulateAttributeUtils::TruncateProtoAttributeValue — the recursive descent into AnyValue::kArrayValue children is intentional and bounded by the SDK-side AttributeValue variant depth. Suppress with a NOLINTBEGIN/END(misc-no-recursion) block, matching the codebase precedent in sdk/src/configuration/configuration_parser.cc. The remaining clang-tidy bugprone-exception-escape warnings in the same config (read_write_log_record.cc:68 SetBody, :158 SetAttribute and otlp_populate_attribute_utils.cc:62/220 PopulateAnyValue) trace through nostd::visit / nostd::get into bad_alloc paths that pre-date this PR; they are out of scope for the LogRecord limits change. Refs: open-telemetry#4126 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: address dbarker v3 review (truncate during conversion) Address @dbarker's three review comments from 2026-06-23 (r3461438236, r3461500683, r3461573442) by moving attribute-value-length truncation from a separate post-conversion step into the conversion paths themselves. Architecture change: Before: convert, default-construct map slot, assign converted, post-truncate (helper) After: convert-with-limit, single emplace sdk/include/opentelemetry/sdk/common/attribute_utils.h * AttributeConverter gains an `explicit AttributeConverter(std::size_t max_length)` constructor. String, bytes, and string-array overloads apply the byte-length cap during the OwnedAttributeValue construction. The default-constructed converter is unchanged (`max_length_ = numeric_limits<size_t>::max()`), so the existing callers in `instrumentation_scope.h` and `read_write_log_record.cc SetBody` keep their current no-truncation behavior. * Delete `TruncateAttributeValueByteLength` (its three branches now live in the converter; the lone production caller was the SDK ReadWriteLogRecord SetAttribute). sdk/src/logs/read_write_log_record.cc * `SetAttribute` rewritten to a single `find` + conditional `emplace`, with the limit-aware converter producing the truncated value in one step. Removes the previous default-construct-then-assign sequence and the now-redundant post-truncate branch. exporters/otlp/include/.../otlp_populate_attribute_utils.h exporters/otlp/src/otlp_populate_attribute_utils.cc * All four `PopulateAttribute` / `PopulateAnyValue` overloads gain a trailing `std::size_t max_length = numeric_limits<size_t>::max()` parameter (default preserves the existing call-site behavior for the other callers in metrics/recordable/resource paths). * String and bytes branches apply truncation in place during the proto set: `Utf8SafePrefixLength` for `string_value` (preserves protobuf wire-format valid UTF-8), plain byte cut for `bytes_value`. * Delete `TruncateProtoAttributeValue`. The flat-AttributeValue input means the recursive array descent it carried was dead code, as dbarker noted. The `NOLINT(misc-no-recursion)` block goes with it. * `Utf8SafePrefixLength` primary overload now takes `(const char*, std::size_t, std::size_t)` so it can be called without constructing a temporary `std::string` from a `string_view`. A thin inline `(const std::string&, std::size_t)` overload preserves backward compatibility for any existing direct user. exporters/otlp/src/otlp_log_recordable.cc * `SetAttribute` now calls the limit-aware `PopulateAttribute` directly in one step, removing the separate post-truncate branch. Test changes: * Delete the five `TruncateAttributeValueByteLength` unit tests in `sdk/test/common/attribute_utils_test.cc` (helper is gone; end-to-end coverage is preserved by `log_record_limits_test.cc`). * Delete the six `TruncateProtoAttributeValue` unit tests in `exporters/otlp/test/otlp_populate_attribute_utils_test.cc` (helper is gone; end-to-end coverage is preserved by `otlp_log_recordable_test.cc`). * The seven `Utf8SafePrefixLength` unit tests still cover the helper that the new in-place truncation path calls into. Refs: open-telemetry#4126 Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: gate SetLogRecordLimits on processor capability CreateLogRecord() called SetLogRecordLimits() on every record unconditionally, paying a virtual dispatch even for recordables that do not enforce limits. Add a RecordableEnforcesLogRecordLimits() capability query on LogRecordExporter and LogRecordProcessor (default false; OTLP and ostream exporters return true; Simple and Batch processors delegate to their exporter; Multi returns true if any child does). LoggerContext caches the result at construction and refreshes it in AddProcessor, so the Logger hot path reads a plain bool and only calls SetLogRecordLimits() when a processor actually enforces limits. The new virtuals are appended at the end of their vtables to keep the change additive. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: UTF-8-safe truncation in AttributeConverter The in-memory AttributeConverter cut string values at a raw byte boundary, which can split a multi-byte UTF-8 sequence and leave an invalid std::string. Move Utf8SafePrefixLength from the OTLP recordable into sdk::common so the converter can share it, and truncate the std::string, string_view, const char*, and string-array alternatives at a UTF-8 code-point boundary. Raw bytes (span<const uint8_t>) keep the exact byte cut since they carry no encoding. The OTLP helper now forwards to the shared implementation, leaving its public surface and tests unchanged. Also fold in review nits: delegate the const char* overload to the string_view overload to avoid copying an oversized C string before truncating, drop a redundant pointer cast in the bytes overload, and use std::strlen. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: satisfy the clang-tidy warning limit A recent merge of main lowered the abiv1-preview and abiv2-preview clang-tidy ceilings to 331 and 341. Two warnings need addressing to stay within them: - Initialize LoggerContext::recordable_enforces_limits_ in the member initializer list instead of the constructor body (cppcoreguidelines-prefer-member-initializer). - Move the rvalue reference parameter in the test TrackingProcessor OnEmit stub (cppcoreguidelines-rvalue-reference-param-not-moved). Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: default recordable to no limits, inject via provider A default-constructed ReadWriteLogRecord / OtlpLogRecordable previously carried the spec-default LogRecordLimits (count 128), so a recordable used without any LoggerProvider wiring enforced the 128 cap. That changed behavior for code that constructs a recordable directly. Default the recordable to no limits and let the LoggerProvider wiring inject the configured limits through SetLogRecordLimits, which it already does only when a processor enforces them. LoggerContext keeps the spec default, so a record created through the standard provider path still gets the 128 cap (or the configured value), while a bare recordable no longer caps on its own. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: address dbarker review (comments, UTF-8 scan shortcut, test) - Correct the SetLogRecordLimits comments on the base Recordable, ReadWriteLogRecord, and OtlpLogRecordable: the limits are copied, so the caller does not need to keep the supplied object alive (the previous "must outlive" wording was stale). - Drop the vtable-append implementation-detail paragraph from the RecordableEnforcesLogRecordLimits comments on LogRecordExporter and LogRecordProcessor. - Short-circuit Utf8SafePrefixLength when the whole value fits within the budget (max_bytes >= size, including the unbounded default), so the common path skips the per-byte scan. - Add a const char* attribute value truncation test. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> * [SDK] LogRecord limits: drop vtable implementation-detail comment Remove the second paragraph of the Recordable::SetLogRecordLimits doc comment (the vtable-append note) per review. It is an implementation detail and matches the paragraphs already dropped from the exporter and processor headers. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> --------- Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com> Co-authored-by: Hyeonho Kim <proost@apache.org> Co-authored-by: Doug Barker <3782873+dbarker@users.noreply.github.com> Co-authored-by: Tom Tan <Tom.Tan@microsoft.com> Co-authored-by: Marc Alff <marc.alff@free.fr>
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 7.2.0 to 7.3.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@f9f3042...53b7df9) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 7.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 4.1.0 to 4.2.0. - [Release notes](https://github.com/docker/setup-qemu-action/releases) - [Commits](docker/setup-qemu-action@0611638...96fe6ef) --- updated-dependencies: - dependency-name: docker/setup-qemu-action dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
) Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 4.1.0 to 4.2.0. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](docker/setup-buildx-action@d7f5e7f...bb05f3f) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [rules_cc](https://github.com/bazelbuild/rules_cc) from 0.2.20 to 0.2.21. - [Release notes](https://github.com/bazelbuild/rules_cc/releases) - [Commits](bazelbuild/rules_cc@0.2.20...0.2.21) --- updated-dependencies: - dependency-name: rules_cc dependency-version: 0.2.21 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lemetry#4213) Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.36.2 to 4.36.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@8aad20d...54f647b) --- updated-dependencies: - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.36.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [fossas/fossa-action](https://github.com/fossas/fossa-action) from 1.9.0 to 2.0.0. - [Release notes](https://github.com/fossas/fossa-action/releases) - [Commits](fossas/fossa-action@ff70fe9...29693cc) --- updated-dependencies: - dependency-name: fossas/fossa-action dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4209) * Bump github/codeql-action/init from 4.36.2 to 4.36.3 Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.36.2 to 4.36.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@8aad20d...54f647b) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.36.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update .github/workflows/codeql-analysis.yml * Update .github/workflows/codeql-analysis.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marc Alff <marc.alff@free.fr>
Bumps [rules_cc](https://github.com/bazelbuild/rules_cc) from 0.2.21 to 0.2.22. - [Release notes](https://github.com/bazelbuild/rules_cc/releases) - [Commits](bazelbuild/rules_cc@0.2.21...0.2.22) --- updated-dependencies: - dependency-name: rules_cc dependency-version: 0.2.22 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…y#4222) Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.19.4 to 2.20.0. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](step-security/harden-runner@9af89fc...bf7454d) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.20.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…n-telemetry#4221) Bumps [bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml](https://github.com/bazel-contrib/publish-to-bcr) from 1.4.1 to 1.4.2. - [Release notes](https://github.com/bazel-contrib/publish-to-bcr/releases) - [Commits](bazel-contrib/publish-to-bcr@c316f16...ad6879f) --- updated-dependencies: - dependency-name: bazel-contrib/publish-to-bcr/.github/workflows/publish.yaml dependency-version: 1.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…lemetry#4227) Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.36.3 to 4.37.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@54f647b...99df26d) --- updated-dependencies: - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4229) * Bump github/codeql-action/init from 4.36.3 to 4.37.0 Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.36.3 to 4.37.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@54f647b...99df26d) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.37.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update .github/workflows/codeql-analysis.yml --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marc Alff <marc.alff@free.fr>
Bumps [actions/stale](https://github.com/actions/stale) from 10.3.0 to 10.4.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@eb5cf3a...1e223db) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ponents script (open-telemetry#4211) * remove feature to add external components to the opentelemetry-cpp CMake build using environment variables in favor or users building external components with opentelemetry-cpp as a dependency imported through find_package or FetchContent * Adds a message if the external component is added. Clean up comments to remove env var support * Update cmake/opentelemetry-build-external-component.cmake Co-authored-by: Tom Tan <lilotom@gmail.com> --------- Co-authored-by: Marc Alff <marc.alff@free.fr> Co-authored-by: Tom Tan <lilotom@gmail.com>
…lemetry#4262) Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.37.0 to 4.37.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@99df26d...7188fc3) --- updated-dependencies: - dependency-name: github/codeql-action/upload-sarif dependency-version: 4.37.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ry#4263) * Bump github/codeql-action/analyze from 4.37.0 to 4.37.1 Bumps [github/codeql-action/analyze](https://github.com/github/codeql-action) from 4.37.0 to 4.37.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@99df26d...7188fc3) --- updated-dependencies: - dependency-name: github/codeql-action/analyze dependency-version: 4.37.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Apply suggestion from @marcalff --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marc Alff <marc.alff@free.fr>
proost
force-pushed
the
feat-exemplar-filters
branch
from
July 18, 2026 05:19
9a02900 to
ad03be6
Compare
Contributor
Author
|
Something wrong. I resend PR. |
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.
Fixes
Changes
Complete exemplar filter.
This changes accompany breaking change. When I read versioning policy, flagged feature is unstable, so API breaking change is accepted, right?
I tried to abstract filte logic into
FilteredExemplarReservoirto avoid filtering logic scattered to metric storage.Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes