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

Sql for .net framework never calls Enrich #4080

Closed
davhdavh opened this issue Jan 16, 2023 · 3 comments
Closed

Sql for .net framework never calls Enrich #4080

davhdavh opened this issue Jan 16, 2023 · 3 comments
Labels
question Further information is requested

Comments

@davhdavh
Copy link

Bug Report

https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Instrumentation.SqlClient/Implementation/SqlEventSourceListener.netfx.cs

It never calls Enrich anywhere.

net462 build.

Symptom

This is valid code in .net framework lib, but it never calls the Enrich method.

                      .AddSqlClientInstrumentation(o => {
                          o.Enrich         = (activity, _, _) => activity.DisplayName = "Sql";
                       })

What is the expected behavior?

Enrich called

What is the actual behavior?

Enrich never called

Reproduce

                      .AddSqlClientInstrumentation(o => {
                          o.Enrich         = (activity, _, _) => activity.DisplayName = "Sql";
                       })
@davhdavh davhdavh added the bug Something isn't working label Jan 16, 2023
@cijothomas
Copy link
Member

@cijothomas cijothomas added question Further information is requested and removed bug Something isn't working labels Jan 17, 2023
@davhdavh
Copy link
Author

davhdavh commented Jan 17, 2023 via email

@cijothomas
Copy link
Member

It specifically says Note: Enrich is supported on .NET and .NET Core runtimes only. Also if it wasn't supposed to be supported why isn't it removed with an #if like many of the other things?

On Tue, Jan 17, 2023, 22:45 Cijo Thomas @.***> wrote: Closed #4080 <#4080> as completed. — Reply to this email directly, view it on GitHub <#4080 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJFIDNZZAQ6WK2RZZIPMJ3WS247ZANCNFSM6AAAAAAT4SV7AE . You are receiving this because you authored the thread.Message ID: <open-telemetry/opentelemetry-dotnet/issue/4080/issue_event/8247057650@ github.com>

It was intentionally done to have same public API in all targets. #3900

davhdavh added a commit to davhdavh/opentelemetry-dotnet that referenced this issue Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants