-
Notifications
You must be signed in to change notification settings - Fork 181
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: use AS::N subscriber for serialize events #1075
fix: use AS::N subscriber for serialize events #1075
Conversation
The details for Context management (i.e. setting current span) are already handled by the OTel ActiveSupport instrumentation. Reuse the notifications subscriber here for ActiveModel serialization events. Reworked the example app into two: one Rails which works with the usual SDK configuration and one standalone (no Rails) to demonstrate that the subscription needs to be made after the SDK configuration is complete. If the subscription is created during instrumentation install, the subscription's tracer will be a NO-OP API tracer and won't produce spans.
...ializers/test/opentelemetry/instrumentation/active_model_serializers/instrumentation_test.rb
Show resolved
Hide resolved
...el_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb
Show resolved
Hide resolved
...el_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb
Show resolved
Hide resolved
...el_serializers/lib/opentelemetry/instrumentation/active_model_serializers/instrumentation.rb
Show resolved
Hide resolved
...tive_model_serializers/lib/opentelemetry/instrumentation/active_model_serializers/railtie.rb
Show resolved
Hide resolved
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
@robbkidd mind taking a look at @kaylareopelle comments? |
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
Co-authored-by: Kayla Reopelle <[email protected]>
... but leave OTLP exporter gem in dependencies so that a curious person can override without code changes to send to some OTLP receiver by setting the appropriate environment variables.
@robbkidd - Example code is cleared from me! It looks like there's a few other things you and @arielvalentin chatted about related to the subscriber and Railties. Is there more you'd like to do to address those questions? I'm not 100% following with a quick read, but happy to take a deeper look if that would help. |
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.
A fast follow up to this would be adding some details in the README about what semantic attributes to expect being emitted by this instrumentation.
Otherwise I think we are good to go.
@kaylareopelle I'm good merge if you are |
@kaylareopelle I think the ideas @arielvalentin and I had in conversations in this PR are not blockers to this PR and can/ought to be done in follow-ups. |
Resolves #992
This mimicks a fair amount of the current ActionMailer and ActionView instrumentation.
The details for Context management (i.e. setting current span) are already handled by the OTel ActiveSupport instrumentation. Reuse the notifications subscriber here for ActiveModel serialization events.
Reworked the example app into two: one Rails which works with the usual SDK configuration and one standalone (no Rails) to demonstrate that the subscription needs to be made after the SDK configuration is complete. If the subscription is created during instrumentation install, the subscription's tracer will be a NO-OP API tracer and won't produce spans.
TODO: