-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat: add otelx package #479
Conversation
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.
Hi there :)
Adding some initial review comments, keep up the good work!
otelx wraps around go.opentelemetry.io/otel to simplify creating and using tracers.
otelx wraps around go.opentelemetry.io/otel to simplify creating and using tracers.
Great! It seems all that is left to do now i so to make the tests work :D https://github.com/ory/x/runs/5991843392?check_suite_focus=true#step%3A12%3A1202= |
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.
LGTM :)
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.
This looks pretty good already 👍
Can we remove the old tracing package as well?
Also, why not stick with the current local_agent_address
config key to avoid breaking changes and all the edge cases in the first place?
Done.
Also done. Not sure why that didn't occur to me 😅 |
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.
Nice, this looks very good now 👍 Just some minor improvements 😉
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.
Just very minor improvements and we're good to go 🎉
otelx/config.schema.json
Outdated
"pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}:([0-9]*)$" | ||
}, | ||
{ | ||
"format": "uri" |
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.
Format uri
requires a scheme, but the code does not allow for parsing schemes, only hostname:port
combinations.
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.
See this example: https://go.dev/play/p/WS8_Bf_JRdR
I.e. for URIs to work, we have to use url.Parse
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.
Yeah I get that, but removing "format": "urI"
causes tests to fail and I'm not sure why.
Guys, please don't remove packages just because a new package has been introduced. This makes it impossible to upgrade ory/x without changing all dependent code of the stuff that has been removed. |
otelx wraps around go.opentelemetry.io/otel to simplify creating and using tracers. This is separate from the ory/x/tracing package as that supports a few more tracers (Zipkin, Instana, ...) which otelx does not, yet.
A note about the tests: the test for Jaeger spans simply spins up a UDP server and passes when data is received. While the byte data looks to be correct, I have not added code to unmarshal it. The reasoning behind this decision:
Related Issue or Design Document
https://github.com/ory-corp/cloud/issues/2191
Checklist
and signed the CLA.
introduces a new feature.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
appropriate).