Skip to content
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

Fix OTEL HTTP exclusion detection #1688

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Conversation

mariomac
Copy link
Contributor

If the OTEL endpoint has a path prefix (e.g. /otlp as in Grafana Cloud), the OTEL Exclusion detection mechanism won't work.

@mariomac mariomac requested a review from a team as a code owner February 21, 2025 14:44
@mariomac mariomac added the bug label Feb 21, 2025
Copy link
Contributor

Hello @mariomac!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice catch!

Copy link
Contributor

This PR must be merged before a backport PR will be created.

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.71%. Comparing base (c6e7e12) to head (09cdf7a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1688      +/-   ##
==========================================
- Coverage   69.76%   69.71%   -0.06%     
==========================================
  Files         209      209              
  Lines       21006    21006              
==========================================
- Hits        14655    14644      -11     
- Misses       5649     5657       +8     
- Partials      702      705       +3     
Flag Coverage Δ
integration-test 54.12% <100.00%> (+0.06%) ⬆️
k8s-integration-test 54.18% <100.00%> (-0.30%) ⬇️
oats-test 34.92% <0.00%> (-0.25%) ⬇️
unittests 46.23% <100.00%> (ø)

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.

Copy link
Member

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do traces as well?

Copy link
Member

@gouthamve gouthamve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mariomac mariomac merged commit dabf256 into grafana:main Feb 21, 2025
13 checks passed
@mariomac mariomac deleted the fix-http-detect branch February 21, 2025 16:01
github-actions bot pushed a commit that referenced this pull request Feb 21, 2025
* Fix OTEL HTTP exclusion detection

* Fix grpc and add traces too

* add unit test

(cherry picked from commit dabf256)
Copy link
Contributor

The backport to release-2.0 failed:

Validation Failed: "Could not resolve to a node with the global id of 'T_kwDOAG3Mbc4AssrW'."

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-1688-to-release-2.0 origin/release-2.0
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x dabf256a3e526a286bdcea66eb1150d9d8e44814

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-1688-to-release-2.0
# Create the PR body template
PR_BODY=$(gh pr view 1688 --json body --template 'Backport dabf256a3e526a286bdcea66eb1150d9d8e44814 from #1688{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title '[release-2.0] Fix OTEL HTTP exclusion detection' --body-file - --label 'bug' --label 'type/bug' --label 'backport' --base release-2.0 --milestone release-2.0 --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-1688-to-release-2.0

# Create a pull request where the `base` branch is `release-2.0` and the `compare`/`head` branch is `backport-1688-to-release-2.0`.

# Remove the local backport branch
git switch main
git branch -D backport-1688-to-release-2.0

rafaelroquetto pushed a commit that referenced this pull request Feb 21, 2025
* Fix OTEL HTTP exclusion detection

* Fix grpc and add traces too

* add unit test

(cherry picked from commit dabf256)

Co-authored-by: Mario Macias <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants