-
Notifications
You must be signed in to change notification settings - Fork 292
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
#1034: AWS SQS and SNS support #1051
#1034: AWS SQS and SNS support #1051
Conversation
- incoming requests: implemented parent extraction for incoming SQS and SNS events (getters) - outgoing requests: implemented enrichment of outgoing message attributes by trace data (setters)
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessageAttributeHelper.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSTracingPipelineHandler.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
…trace data injection + adapted tests accordingly
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1051 +/- ##
==========================================
- Coverage 72.83% 72.65% -0.18%
==========================================
Files 247 252 +5
Lines 8835 8949 +114
==========================================
+ Hits 6435 6502 +67
- Misses 2400 2447 +47
|
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/IRequestContextAdapter.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/IRequestContextAdapter.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/OpenTelemetry.Contrib.Instrumentation.AWS.csproj
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSMessagingUtils.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/OpenTelemetry.Instrumentation.AWSLambda.csproj
Show resolved
Hide resolved
… the processing code from AWSMessagingUtils to adapter's implementations.
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSMessagingUtils.cs
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/AWSServiceType.cs
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/IRequestContextAdapter.cs
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/OpenTelemetry.Contrib.Instrumentation.AWS.csproj
Outdated
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/OpenTelemetry.Instrumentation.AWSLambda.csproj
Show resolved
Hide resolved
src/OpenTelemetry.Contrib.Instrumentation.AWS/Implementation/SnsRequestContextAdapter.cs
Outdated
Show resolved
Hide resolved
- got rid of IRequestContextAdapter interface and replaced it by Action<T> - returned direct ref. to AWSSDK.Core 3.5.1.24 and downgraded AWSSDK.SimpleNotificationService and AWSSDK.SQS to be compatible with the AWSSDK.Core
Hi @srprash ! The final changes have been made after discussions about creating/not creating a parent from a message batch. The new configuration setting has been introduced for toggling the parent creation. Please, review these as well as previous changes. Thank you. |
# Conflicts: # src/OpenTelemetry.Contrib.Instrumentation.AWS/OpenTelemetry.Contrib.Instrumentation.AWS.csproj # src/OpenTelemetry.Instrumentation.AWSLambda/OpenTelemetry.Instrumentation.AWSLambda.csproj
|
EasyCLA issue seems to be open-telemetry/community#1445 |
/easycla |
Looping in @atshaw43 to take a look. |
Co-authored-by: Christian Neumüller <christian+github@neumueller.me>
Spent a bit of time thinking about this and chatting to messaging people about it, and I'm still not completely sure that this is the right approach. That said, I'm also not sure what the right approach should be here, and so, please take this as an observation and in no way a blocker. The links that are being created could be misleading. I'm behind the fact that we shouldn't set a parent (a batch execution is a trace in itself), however, linking that batch execution to the parent spans of the messages it's processing isn't how I would see this being beneficial. The issue is that you can't link to the spans that are created for the message processing as, by definition, they're started/created after the batch has started. Which leaves the dilemma of what to do? I look at things through the lens of someone debugging a platform, rather than the code. One issue I'm thinking of is that the batch processing crashes out half way through, and you end up with the latter half of the messages not being processed. In that scenario, the latter half of the messages' trace parent is linked to the batch execution, however, nothing happened. That could be really confusing to the person debugging. The other part is that I would expect the message processing span to be linked to the batch execution span, while having a parent of the originating message. Which means we're ending up with twice the amount of links being created. I haven't seen anything in the library like a helper method to create an activity from the item in the batch, that would be a nice addition as we would be expecting people to do that in batch processing mode. All in all, I think we've come along way in the right direction now. I haven't reviewed the code for style or completeness etc. I've assumed someone else was doing that, but if I need to then please ping me. |
I also didn't see anything in a README about this setting, I think that would be a strong suggestion from me as the setting will need a lot of explaining. |
Are you aware of the messaging semantic convention group's proposal about the messaging parenting/linking topic? open-telemetry/oteps#220 |
I agree on this, but that can be provided in a follow-up (this PR is already rather large). |
Changes