Skip to content

Conversation

@AsakerMohd
Copy link
Contributor

Changes

Added changes to detect bedrock spans and populate attributes accordingly. Also added logic to populate aws specific attributes used by AWS Application Signals like "aws.region", "aws.service", "aws.operation", "aws.requestId", etc. We are currently using our own fork of Opentelemetry-Instrumentation-AWS here: https://github.com/aws-observability/aws-otel-dotnet-instrumentation/tree/main/src/OpenTelemetry.Instrumentation.AWS. This change syncs our local fork so that we can stop relying on it and instead reference this directly instead.

I did some manual testing and was able to verify that the spans created contain the required information.

This PR builds on top of this PR: #2458. The old PR went stale especially after moving from AWS SDK v3 to v4. Most of the comments there have been addressed and most of the semconvs used here are now merged in the semconv pkg.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, nullable enabled, static analysis, etc.)
  • Unit tests added/updated
  • Appropriate CHANGELOG.md files updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

@AsakerMohd AsakerMohd requested a review from a team as a code owner October 21, 2025 17:48
@github-actions github-actions bot added the comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS label Oct 21, 2025
@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 73.95833% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.33%. Comparing base (0e8f8fd) to head (81441f1).
⚠️ Report is 11 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...on.AWS/Implementation/AWSTracingPipelineHandler.cs 49.46% 47 Missing ⚠️
...ntation.AWS/Implementation/AWSLlmModelProcessor.cs 86.25% 22 Missing ⚠️
...strumentation.AWS/AWSInstrumentationEventSource.cs 50.00% 3 Missing ⚠️
...strumentation.AWS/Implementation/AWSServiceType.cs 40.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3257      +/-   ##
==========================================
- Coverage   70.35%   70.33%   -0.02%     
==========================================
  Files         440      442       +2     
  Lines       17213    17433     +220     
==========================================
+ Hits        12110    12262     +152     
- Misses       5103     5171      +68     
Flag Coverage Δ
unittests-Contrib.Shared.Tests 86.25% <ø> (ø)
unittests-Exporter.Geneva 53.78% <ø> (+0.11%) ⬆️
unittests-Exporter.InfluxDB 95.14% <ø> (ø)
unittests-Exporter.Instana 74.86% <ø> (ø)
unittests-Exporter.OneCollector 94.61% <ø> (ø)
unittests-Extensions 90.65% <ø> (ø)
unittests-Extensions.Enrichment 100.00% <ø> (ø)
unittests-Extensions.Enrichment.AspNetCore 86.27% <ø> (ø)
unittests-Extensions.Enrichment.Http 94.33% <ø> (ø)
unittests-Instrumentation.AWS 80.25% <73.95%> (-3.56%) ⬇️
unittests-Instrumentation.AspNet 77.92% <ø> (ø)
unittests-Instrumentation.AspNetCore 70.76% <ø> (ø)
unittests-Instrumentation.Cassandra 23.52% <ø> (ø)
unittests-Instrumentation.ConfluentKafka 14.10% <ø> (ø)
unittests-Instrumentation.ElasticsearchClient 80.12% <ø> (ø)
unittests-Instrumentation.EntityFrameworkCore 80.80% <ø> (ø)
unittests-Instrumentation.EventCounters 76.36% <ø> (ø)
unittests-Instrumentation.GrpcCore 91.42% <ø> (ø)
unittests-Instrumentation.GrpcNetClient 79.61% <ø> (ø)
unittests-Instrumentation.Hangfire 84.61% <ø> (ø)
unittests-Instrumentation.Http 74.18% <ø> (ø)
unittests-Instrumentation.Owin 88.62% <ø> (ø)
unittests-Instrumentation.Process 100.00% <ø> (ø)
unittests-Instrumentation.Quartz 78.76% <ø> (ø)
unittests-Instrumentation.Runtime 100.00% <ø> (ø)
unittests-Instrumentation.ServiceFabricRemoting 34.54% <ø> (ø)
unittests-Instrumentation.SqlClient 87.29% <ø> (ø)
unittests-Instrumentation.StackExchangeRedis 71.80% <ø> (ø)
unittests-Instrumentation.Wcf 79.68% <ø> (+0.13%) ⬆️
unittests-OpAmp.Client 71.55% <ø> (ø)
unittests-PersistentStorage 65.88% <ø> (+0.66%) ⬆️
unittests-Resources.AWS 74.42% <ø> (ø)
unittests-Resources.Azure 85.31% <ø> (ø)
unittests-Resources.Container 67.34% <ø> (ø)
unittests-Resources.Gcp 71.42% <ø> (ø)
unittests-Resources.Host 71.85% <ø> (ø)
unittests-Resources.OperatingSystem 76.98% <ø> (ø)
unittests-Resources.Process 100.00% <ø> (ø)
unittests-Resources.ProcessRuntime 79.59% <ø> (ø)
unittests-Sampler.AWS 87.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rumentation.AWS/Implementation/AWSServiceHelper.cs 92.45% <100.00%> (-6.27%) ⬇️
...strumentation.AWS/AWSInstrumentationEventSource.cs 50.00% <50.00%> (ø)
...strumentation.AWS/Implementation/AWSServiceType.cs 50.00% <40.00%> (-21.43%) ⬇️
...ntation.AWS/Implementation/AWSLlmModelProcessor.cs 86.25% <86.25%> (ø)
...on.AWS/Implementation/AWSTracingPipelineHandler.cs 65.16% <49.46%> (-21.26%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:instrumentation.aws Things related to OpenTelemetry.Instrumentation.AWS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants