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
Add OpenTelemetry instrumentation #30130
Conversation
This looks like a good consolidation. I'll try it out locally! Some things:
|
Fixed, sorry. If needed, you can ping me on the Pollinators slack I just pushed a small change to add the current version in the We also probably need to not send traces for the healthcheck endpoint. We enabled sending OTEL traces to our Datadog account through the collector, and the span names are not very useful. Will try to see how we can improve those |
Pushed a new change which removes ActiveSupport, ActionPack and ActionView integrations, as well as the custom ActiveRecord one, because those are enabled by the Rails integration directly now. |
The I see attr_encrypted is still a dependency. It was upgraded to 4.0.0 since I last tested things, but 4.0.0 still uses I'll see if I see this bad interaction again locally! |
There is an approved but not yet merged PR which removes it - #28325 - part of larger migration to native AR encryption. |
❤️ This is a good and noble quest. If the monkeypatches still conflict, the custom AS::Notification subscription can return as a temporary measure until native AR encryption lands. |
📰 I'm running in docker compose locally with 41b1bff ( |
Running this branch on my instance (container built here) and seeing infinite recursion happening again. It's manifesting the same as before, in I haven't dug too deeply into it yet; I just got it built and deployed. Is it possible we still have conflicting monkeypatching strategies going on? |
I haven't fully read the entire previous thing or dug deep into the arel/otel interaction here ... but FYI the PR which removes attr_encrypted has now been merged, but this branch is not yet rebased after that merge, so I'd expect whatever interactions existed there to still be present on this branch. |
Rebased with the removal of |
Oooh, okay. I definitely misread the part up-thread. I rebuilt the container with the rebase and deployed that and I haven't seen this issue since! Excellent work, folks! |
This is based on the work from #20338 and #29016 Co-authored-by: Juliano Costa <[email protected]> Co-authored-by: Robb Kidd <[email protected]>
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'm somewhat uncomfortable with adding a large amount of dependencies, but this seems as self-contained as it gets, and the fact it is in an optional dependency group is appreciable.
I recall previous discussion about the OpenTelemetry integration replacing the nsa gem statsd support -- #29065 (comment) -- on top of the initial work here, what things need to be done to enable that? |
I would say that you can now get all the information from the NSA gem using OTEL (+ sidekiq-exporter maybe), + many more useful performance data, so I would be inclined to drop the NSA gem entirely? |
Yeah ... I think that was the plan based on that original thread ... was just trying to confirm if we were there yet with just this PR, and it sounds like probably yes? I'll open PR to remove nsa and we can work through there if that's true. |
Need to think a bit about either deprecating NSA in 4.3, then removing in 4.4, or removing it in 4.3 directly |
Co-authored-by: Juliano Costa <[email protected]> Co-authored-by: Robb Kidd <[email protected]>
We already deprecated StatsD integration in 4.2.0, but we had no replacement available at the time. Furthermore, it was kinda buried in the release notes |
This is based on the work from #20338 and #29016.
We want to deploy this to our staging environment to test how it behaves, and we can only build containers from PRs if the branch is part of the main repository, so I re-created the PR.
It mixes the good work from @robbkidd @julianocosta89
I went with
use_all
as advised by @robbkidd, if this load only the required gems then it should be equivalent, and is less verbose. I kept the documentation on how to disable a specific instrumentation.The gems are now in a specific group, allowing people who do not want to install the OTEL gems to use
bundle --without opentelemetry
.Once we have been able to test this, I will add back the collector config & build files from #29016