-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
WIP: Add builtin OpenTelemetry support #33908
base: main
Are you sure you want to change the base?
Conversation
Ah so this is what you had in mind... |
Well, this is just a demo. Actually I was trying to add a build flag to introduce the otel tracer, but then I found that the JSON API is officially supported and extremely simple. https://github.com/open-telemetry/opentelemetry-proto/blob/main/examples/trace.json . Then I think this could be a good solution. |
Well in that case, thanks for the technical discussions on the feature then - it was a really fun time. Shame we have different ideas and needs for this feature. |
@TheFox0x7 I think this approach can support introducing the official otel library and have it behind a build flag so as not to introduce the additional size by default |
I see no point of adding it in general if this approach will be built-in. Full disclosure: |
4a72ca4
to
3a65611
Compare
That's still the unclear part to me: why this design doesn't satisfy your requirement, and why you need to write your own otel code and maintain your own. Till now, the otel sdk just doesn't work with Gitea due to various legacy problems (including the ctx problem). I do not think you are able to make otel sdk really work correctly and collect what you want in current code base. Everything I am doing now is trying to figure out how to make Gitea could report its traces to otel collector correctly, and as I said, it won't block anything including using the official sdk in the future. If this design blocks anything, please show a real example to help me to understand the problem. |
By the way, TBH I don't want to disappoint you .... and thank you very much for helping discussing and resolving various problem. Actually if you have enough time to help users to diagnose these deadlock/slow problems, it's indeed very appreciated and you could propose related changes for these problems and put the ideas into practice. |
It's the main reason why I try to detach context from places actually. And my latest attempt actually works way better :) To be honest it comes down to preference. I hold the opinion that the design would be better if it relied on the otel API instead of wrapping it but the argument for wrapping is not something I can fight with anything but "I don't like it". That's a poor argument and to date I lack better ones.
Please don't take what I wrote personally. You had better arguments for your approach and I respect it. Maybe I could've done better with my side. And I really enjoyed the discussions :) Speaking of which the database spans need to go IMO. To explain why go to it ended up being around ~4500 spans, mainly database ones which is useless. |
It seems that you caught this issue: When there are too many Commits, the "Contributors" page displays an "Internal Server Error." #33867 🤣 |
not that endpoint but partially yeah. But activity does return what it should in ~2 minutes so it's just dos'ing my jaeger UI db spans, all of which are |
It works.