Skip to content

Resource labels support - #907

Merged
grcevski merged 7 commits into
open-telemetry:mainfrom
grcevski:resource_labels
Nov 21, 2025
Merged

Resource labels support#907
grcevski merged 7 commits into
open-telemetry:mainfrom
grcevski:resource_labels

Conversation

@grcevski

@grcevski grcevski commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

This PR extends our resource label support beyond K8s. Currently we were parsing the resource labels only when we see them in k8s metadata, but without k8s we were only setting the name and namespace from the environment variables.

I improved couple of things:

  1. Process environment variables have the fully resolved names, therefore we should not clobber them if k8s finds unresolved variables. I allowed this code to run.
  2. I ensured we don't store unresolved names in the metadata, so we don't put anything that starts with $.

Co-authored with @skl

@grcevski
grcevski requested a review from a team as a code owner November 20, 2025 19:33
@codecov

codecov Bot commented Nov 20, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.14%. Comparing base (30ede70) to head (6b6b85b).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
pkg/transform/k8s.go 84.61% 1 Missing and 1 partial ⚠️
pkg/appolly/discover/typer.go 0.00% 0 Missing and 1 partial ⚠️
pkg/kube/store.go 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #907      +/-   ##
==========================================
+ Coverage   45.82%   55.14%   +9.31%     
==========================================
  Files         253      253              
  Lines       26129    21726    -4403     
==========================================
+ Hits        11974    11981       +7     
+ Misses      13331     8921    -4410     
  Partials      824      824              
Flag Coverage Δ
integration-test 23.25% <16.21%> (+4.26%) ⬆️
integration-test-arm 0.00% <0.00%> (ø)
integration-test-vm-${ARCH}-${KERNEL_VERSION} 0.00% <0.00%> (?)
k8s-integration-test 2.73% <0.00%> (-0.01%) ⬇️
oats-test 0.00% <0.00%> (ø)
unittests 46.26% <83.78%> (+0.01%) ⬆️

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 b3fa99f into open-telemetry:main Nov 21, 2025
56 of 58 checks passed
@grcevski
grcevski deleted the resource_labels branch November 21, 2025 14:25
@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