-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(otel): Add native OpenTelemetry Transport module #3938
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
base: master
Are you sure you want to change the base?
feat(otel): Add native OpenTelemetry Transport module #3938
Conversation
|
@gmlewis - Surprise! Haha. Please review. |
|
@merchantmoh-debug - I'm starting to think I'm talking to a bot. |
|
@gmlewis - Yeah. My bad. It's on my local disk set up. I use antigravity heavily. It likely made an error. I'll fix it. |
1d9b307 to
4536640
Compare
A bot that codes 3x performance boosts to stringify? Can I get access to that bot please? |
|
@merchantmoh-debug - are you planning on updating this PR as requested, or shall we close it since the PR title and description have nothing to do with the changes that have been made? |
42cbea7 to
0b0ca7c
Compare
|
@gmlewis - Fixed. |
0b0ca7c to
19330d6
Compare
alexandear
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix lint issues: ./script/lint.sh.
19330d6 to
c786a38
Compare
|
Thanks for the review @alexandear @gmlewis I've addressed all your feedback in the latest push: Directory Structure: Moved otel/example to example/otel to align with repo conventions. Standards: Added missing Copyright headers (2026) and updated the instrumentationName to v82. Code Design: Exported HeaderRateReset in github/github.go and updated transport.go to use this constant instead of the hardcoded string. Maintenance: Added a sentinel // NOTE comment above instrumentationName to flag it for manual updates during release cycles. Linting: Ran go mod tidy in both the root and example directories to resolve the go.sum validation errors. Requesting review @gmlewis @alexandear |
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can completely remove otel/example/* since the example now lives in example/otel.
Please fix the linting and test errors (see CONTRIBUTING.md) and push the changes before we can fully review this PR.
c786a38 to
9ea671d
Compare
|
@merchantmoh-debug - you just force-pushed over 1000 files.
|
|
@gmlewis - Lmao. Antigravity is finicky. My bad. It's still a google labs product.... hahaha - I'm laughing my head off right now. "Over 1000" omg what did it push? my entire library? lmao. I'll reverse it --- If the lint doesn't fix I might need your help figuring it out. |
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@merchantmoh-debug - please remove the "go" folder.
I really wish you would review your PRs using the GitHub user interface before requesting code reviews as this is truly a waste of my time and patience.
Hey @merchantmoh-debug, could you manually edit and push changes by using
No worries! You can fix lint issues easily by running |
|
@gmlewis - Well seeing as I'm both using my time & patience to give google free upgrades to its library - - We both lose time when things to go right now don't we? Yeah - once more; I'm still learning the ropes. Ever taught at a school? You don't get far with impatience & frustration. You have to be patient. Don't be fooled by the competence of my coding and assume I know what I'm doing fully. I don't. I'm a unicorn - you'll have to delete any patterns you have on what's "normal" when dealing with me. I'm High-IQ Autistic, Non-Automatic TOMS < (I bet you can tell) > ADHD > OCD > OCPD. I see the world in systems and logic. It makes me amazingly good at learning extremely complex things extremely quickly. But it often leads me to learn something like "How to be a badass coder" before I ever learn "How to navigate Githubs user-interface" And I like to trial & error my way through problems - try, review, try, review - I WOULD do this automatically but the tests are set to only happen when you review. Forcing a human-in-the-loop situation where you get frustrated when I make an oppsie which will NOT stop happening right away. It's the trade off of the neurodivergent my friend - super-smart but super-hard to deal with. And me? I'm actually pretty good to deal with in comparison. 🤷♂️ |
@alexandear - Thanks! I appreciate the guidance! Yeah of course! No problem! I'll manually edit them! You're awesome. |
9ea671d to
03b05e6
Compare
|
@alexandear - Thanks for the cheat sheet & the other link. Huge help. Saves a lot of your guys time now that I can do the testing myself. I'll update soon. |
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like somehow all the files suddenly got double-spaced and the linter is not happy about it. I don't think the previous version had the double-spacing issue.
|
@gmlewis - Yup. the files got converted to CRLF within antigravity introducing double lines. Fixed the issue so it stops happening. I'll recommit in a moment. |
|
Tactical Tip (The "Never Again" Lock): Before you push, run this to strip the ghosts: gofmt -w -l . (Standard Go formatter usually fixes line endings too). OR find . -type f -name "*.go" -exec dos2unix {} + ---- Hopefully that "tactical tip" my AI gave me worked! |
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, github/github.go is pretty mangled now. You probably want to redo the changes to this file.
|
@gmlewis - Yeah. I'm trying to figure out a way out of this cycle - I hate getting stuck at the finish line. I'll hang up my hat and beg your help after a couple more tries 😂 |
21a1109 to
85f80ce
Compare
|
@gmlewis - Hold off the retest. I figured out the problem. I found the write tests. I'll hit review when I'm ready. |
|
@gmlewis - Alright. If this works it works. If not - feel free to suggest the fixes and I'll commit. I'm heading to bed now but I should be awake for at least 30 more minutes. |
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, 28 files have now been edited when we were down to the correct 8 two commits ago. If you revert the changes to 20 of the files, we can take another look.
7b262f6 to
2ac81f8
Compare
|
@gmlewis - Should be good to go now. Feel free to do the tests and suggest any fixes if any come up. My stubborn desire to preserve automation has led me to much success in extreme productivity - but at the price of idiotic errors that make me want to hide my face in embarrassment. The price of progress? Thanks for the patience @gmlewis - Let's get this one over with so I can finish the Iterator & go from there. :) |
Co-authored-by: Oleksandr Redko <[email protected]>
Co-authored-by: Oleksandr Redko <[email protected]>
Co-authored-by: Oleksandr Redko <[email protected]>
Co-authored-by: Oleksandr Redko <[email protected]>
Co-authored-by: Oleksandr Redko <[email protected]>
Co-authored-by: Oleksandr Redko <[email protected]>
|
@alexandear - Thanks for the chores - that's quite a smart addition to make contributions easier. Thanks as well for the suggestions. All suggestions committed as requested. |

Adds a new optional module
github.com/google/go-github/v81/otelwhich provides anhttp.RoundTripperinstrumented with OpenTelemetry.Features
github/GET).X-RateLimit-*) and records them as Span Attributes (github.rate_limit.remaining,github.rate_limit.reset).X-Github-Request-Idfor easy debugging with GitHub Support.Verification
Validated with
otel/exampleapp against the live API.Dependencies are isolated in a nested module to avoid bloating core
go-github.