Skip to content
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

SQS: adds attributes to spans that allow linking to SQS entities #1954

Merged
merged 3 commits into from
Jun 26, 2024

Conversation

meiao
Copy link
Contributor

@meiao meiao commented Jun 21, 2024

Overview

Adds the following attributes to SQS external spans so they can be linked to the respective SQS entity.

  • messaging.system
  • cloud.region
  • cloud.account.id
  • messaging.destination.name

Related Github Issue

#1835

Testing

Testing for this feature is a hampered due to a dependency. When that dependency is updated, then the tests in the SQS instrumentation modules can be run.

API changes

There are a few changes to the external API. New attributes and methods were added to MessageProduceParameters and MessageConsumeParameters and their respective builders.

For the parameters the added methods are getters.

For the builders, new methods were added to the Build interface and all return a Build, so they can be concatenated. The new methods being on the Build interface, essentially make them optional (which they are), thus this addition will not break existing use of the API.

Another method that was added was an overload of the existing MessageConsumeParameters#library and MessageProduceParameters#library methods. This new method receives 2 Strings, the first one is the library name used by the agent, this matches the parameter for the existing method. A second String was added to record the name of the library used by OTEL, which in many cases is slightly different from the agent's. Since this is the first method called in the builder process, this also won't break existing use of the API.

Checks

  • Your contributions are backwards compatible with relevant frameworks and APIs.
  • Your code does not contain any breaking changes. Otherwise please describe.
  • Your code does not introduce any new dependencies. Otherwise please describe.

@meiao meiao force-pushed the sqs-arn-clean branch 3 times, most recently from 084bb2a to 8144038 Compare June 21, 2024 18:09
@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 4.34783% with 22 lines in your changes missing coverage. Please review.

Project coverage is 70.58%. Comparing base (be49741) to head (e3e5d1b).

Files Patch % Lines
...elic/agent/service/analytics/SpanEventFactory.java 4.34% 20 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1954      +/-   ##
============================================
- Coverage     70.65%   70.58%   -0.08%     
+ Complexity     9861     9859       -2     
============================================
  Files           827      827              
  Lines         39835    39857      +22     
  Branches       6066     6068       +2     
============================================
- Hits          28147    28134      -13     
- Misses         8961     8994      +33     
- Partials       2727     2729       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@meiao meiao requested a review from a team June 26, 2024 15:47
@meiao meiao merged commit 7ce4777 into main Jun 26, 2024
111 checks passed
@meiao meiao deleted the sqs-arn-clean branch June 26, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants