Skip to content

Low-cardinality route from path mode - #882

Merged
grcevski merged 14 commits into
open-telemetry:mainfrom
grcevski:add_secondary_clustering_per_service
Nov 13, 2025
Merged

Low-cardinality route from path mode#882
grcevski merged 14 commits into
open-telemetry:mainfrom
grcevski:add_secondary_clustering_per_service

Conversation

@grcevski

Copy link
Copy Markdown
Contributor

OBI does only Java route harvesting at the moment, and while we are expanding that support, there may always be the need to derive the OTel compliant route from the URL path. At the moment, the default mode in OBI is the clustering approach, where we detect IDs and gibberish words.

The clustering (gibberish) detection can be easily defeated via Github like URL patterns. For example, none of these paths are gibberish and will produce a high-cardinality derived route:

/open-telemetry/opentelemetry-ebpf-instrumentation/hooks
/open-telemetry/opentelemetry-ebpf-instrumentation/internal/
/open-telemetry/opentelemetry-ebpf-instrumentation/internal/test
/open-telemetry/opentelemetry-ebpf-instrumentation/internal/tools
...

With this PR I'm introducing a second level route collapsing mechanism, which aggregates by service the high cardinality routes using a trie. We have a new config option which is the allowed cardinality per level and once the paths grow beyond the allowed level, the trie node is collapsed into the wildcard.

@grcevski
grcevski requested a review from a team as a code owner November 11, 2025 00:12
@codecov

codecov Bot commented Nov 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.19328% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.29%. Comparing base (2bfa737) to head (f866218).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
pkg/internal/transform/route/clusterurl/trie.go 83.69% 11 Missing and 4 partials ⚠️
pkg/transform/routes.go 76.19% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #882      +/-   ##
==========================================
+ Coverage   55.15%   55.29%   +0.14%     
==========================================
  Files         251      252       +1     
  Lines       21481    21593     +112     
==========================================
+ Hits        11847    11940      +93     
- Misses       8818     8831      +13     
- Partials      816      822       +6     
Flag Coverage Δ
integration-test 23.21% <11.76%> (-0.08%) ⬇️
integration-test-arm 0.00% <0.00%> (?)
integration-test-vm-${ARCH}-${KERNEL_VERSION} 0.00% <0.00%> (?)
k8s-integration-test 2.74% <0.00%> (-0.02%) ⬇️
oats-test 0.00% <0.00%> (ø)
unittests 46.44% <80.67%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@grcevski
grcevski merged commit 14d05df into open-telemetry:main Nov 13, 2025
50 checks passed
@grcevski
grcevski deleted the add_secondary_clustering_per_service branch November 13, 2025 17:38
@MrAlias MrAlias added this to the v0.3.0 milestone Dec 3, 2025
@MrAlias MrAlias mentioned this pull request Dec 3, 2025
marctc pushed a commit to grafana/opentelemetry-ebpf-instrumentation that referenced this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants