[DO NOT MERGE] POC of sql commenter with text attributes propagator
#512
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a prototype to demonstrate SQL commenter with the
text attributespropagator.This is the instrumentation API to enable SQL commenter: https://github.com/XSAM/otelsql/pull/512/files#diff-086a37ef11c8fd9a2516991339db79c207741ac98dd89c8215d31a8bead2814fR94
This is an example of usage: https://github.com/XSAM/otelsql/pull/512/files#diff-65caf616dc77b09c44c1fc0eba33369464655b1318bdedb0051351b635ebf881R138-R141
Steps to run the example:
example/sql-commenterfolderdocker compose up -dThis runs a sql server, otel collector, and sql client.docker compose up clientto run a query from sql client. Meanwhile,Example results:
WAITFOR DELAY '00:00:05' /*service.name='otelsql-example',traceparent='00-13ca090ee3e5b732879841a494b4dd45-b5ad38f303f1f181-01'*/SELECT * FROM sys.dm_exec_connections; WAITFOR DELAY '00:00:05' /*service.name='otelsql-example',traceparent='00-13ca090ee3e5b732879841a494b4dd45-b5ad38f303f1f181-01'*/You could remove
TraceContextpropagator here, https://github.com/XSAM/otelsql/pull/512/files#diff-65caf616dc77b09c44c1fc0eba33369464655b1318bdedb0051351b635ebf881R140. Then, you will get a query like thisWAITFOR DELAY '00:00:05' /*service.name='otelsql-example'*/