aws-observability / aws-otel-java-instrumentation

AWS Distro for OpenTelemetry Java Instrumentation Library
https://aws-otel.github.io/
Apache License 2.0
76 stars 56 forks source link

Assert extra spans for MySQlConnectorJ-8.4. #888

Closed sam6134 closed 2 months ago

sam6134 commented 2 months ago

Description of changes: Assert extra spans for MySQlConnectorJ-8.4.

When making a database query, Pulse agent leverage OTEL agent to intercept the database queries and send them to Cloud-watch agent. Then CloudWatch agent send all telemetry into Cloud-watch

We noticed that there will be two separate EMF log entries, one without remote identifier and one with remote identifier, this extra EMF comes in due to extra telemetry traces that come with mysqlConnector version 8.4

The feature is supported by component_telemetry. MySQL Connector/J 8.4.0 introduces the client-side counterpart feature, with the capability of propagating the context to the MySQL Server it connects to and allowing a more complete observability for an application stack. (Ref)

The following commit adds the extra assertion of asserting the extra SELECT span.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.