dd-trace-dotnet icon indicating copy to clipboard operation
dd-trace-dotnet copied to clipboard

[FEATURE]: Custom Span Tags for SQL Spans

Open jwyza-pi opened this issue 10 months ago • 1 comments

Framework or Library Name

No response

Library Type

No response

Library Version(s)

No response

Describe the feature you'd like

Presently SQL spans are generated by what appears to be site call interceptions. This means that, as far as I can tell, we lack the ability to modify those spans in any way. Specifically we lack the ability to add custom tags using Tracer.Instance.ActiveScope.Span.SetTag. Given that, would it be possible to do something like adding the ability to inject tags for the span based on something inside the query itself? Thinking something like specialized comments:

-- spantag:mytagname1:mytagvalue1
-- spantag:foo:bar

SELECT * FROM MyTable WHERE Id = @id

Is your feature request related to a problem?

No response

Describe alternatives you've considered

No response

Additional context

No response

jwyza-pi avatar Feb 18 '25 13:02 jwyza-pi

Hi @jwyza-pi,

Thanks a bunch for filing this, I'm thinking that this would be best handled by being routed as a Feature Request via our Helpdesk.

Thanks

bouwkast avatar Feb 18 '25 14:02 bouwkast