-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implemented Plugin.cs to enable Application Singals Instrumentation. #20
Conversation
src/AWS.OpenTelemetry.AutoInstrumentation/AwsMetricAttributesSpanProcessor.cs
Show resolved
Hide resolved
Following wrong span kind value is known issue and fixed in other PR.
|
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.
LGTM
src/AWS.OpenTelemetry.AutoInstrumentation/AwsMetricAttributesSpanProcessor.cs
Outdated
Show resolved
Hide resolved
src/AWS.OpenTelemetry.AutoInstrumentation/AwsMetricAttributesSpanProcessorBuilder.cs
Show resolved
Hide resolved
src/AWS.OpenTelemetry.AutoInstrumentation/AwsMetricAttributesSpanProcessorBuilder.cs
Show resolved
Hide resolved
src/AWS.OpenTelemetry.AutoInstrumentation/AWS.OpenTelemetry.AutoInstrumentation.csproj
Show resolved
Hide resolved
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.
added one more comment
fc09f3d
to
284ef41
Compare
Create an issue #22 to track the follow-up actions for comments. |
Issue #, if available:
Description of changes:
This PR has multiple changes that were needed to get instrumentation working as expected. The changes are listed below:
AwsMetricAttributesSpanProcessor.cs
module that replacesAwsMetricAttributesSpanExporter.cs
. AwsMetricAttributesSpanExporter is a wrapper that wraps around existing exporters to modify spans. Since we don't have access to these exporters, CreatedAwsMetricAttributesSpanProcessor
which does the same thing as the exporter in terms of span modification and registered that processor as the first processor. Since, according to spec, processors are invoked in order of registration, we can be confident that the spans being exported would be modified as expected. The processor implementation is based on the java exporter implementation.Testing:
Started up a sample app and collector and verified that the collector was getting spans that were populated with aws attributes for application signals and that appeared on the traces console on cloudwatch:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.