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

Validate if OpenTelemetry.AutoInstrumentation can be loaded from native profiler without the help of StartupHook. #2295

Closed
Kielek opened this issue Mar 7, 2023 · 8 comments · Fixed by #2335
Assignees

Comments

@Kielek
Copy link
Contributor

Kielek commented Mar 7, 2023

Not related to this PR, need to validate if OpenTelemetry.AutoInstrumentation can be loaded from native profiler without the help of StartupHook.

Originally posted by @rajkumar-rangaraj in #2286 (comment)

@pjanotti
Copy link
Contributor

pjanotti commented Mar 7, 2023

See #2286 (comment)

In short: not at this time we opted to require the StartupHook for .NET applications. The CLR Profiler won't attach and will log an error if the StartupHook is not configured.

@lumbans
Copy link

lumbans commented Mar 8, 2023

I have relate problem, with err message:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

File name: 'Microsoft.Extensions.Logging.Abstractions, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Microsoft.Extensions.DependencyInjection.LoggingServiceCollectionExtensions.AddLogging(IServiceCollection services, Action`1 configure)
at Microsoft.Extensions.DependencyInjection.LoggingServiceCollectionExtensions.AddLogging(IServiceCollection services)
at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
at Microsoft.Extensions.Hosting.HostBuilder.Build()

@Kielek
Copy link
Contributor Author

Kielek commented Mar 8, 2023

@lumbans, I do not think that you question is related. Please lets go to #2296

@nrcventura
Copy link
Member

One of the reasons we switched to the startup hook to bootstrap everything is that we noticed that many aspnetcore apps that relied on the profiler to bootstrap everything appeared to bootstrap things too early. We did not see the same problem with the startup hook solution. If we decide to follow this approach, we will need to do additional testing to ensure that we are bootstrapping things at an appropriate time.

@lumbans
Copy link

lumbans commented Mar 15, 2023

@Kielek can sql call query detected in dotnet auto instrumentation?
on my configuration not show the query statement

@Kielek
Copy link
Contributor Author

Kielek commented Mar 15, 2023

@lumbans, it depends what type of library you are using for it. For v0.6.0 there is a support for SqlClient both from Microsoft.Data.SqlClient and System.Data.SqlClient. Ref: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/blob/v0.6.0/docs/config.md#traces-instrumentations

Could you please rise new issues for each independent topic? It is a lot of easier to manage one topic per issue.

@Kielek
Copy link
Contributor Author

Kielek commented Mar 15, 2023

@rajkumar-rangaraj, please check if current state is enough from your perspective.

@rajkumar-rangaraj
Copy link
Contributor

As discussed in SIG, we need to clean-up code in StartupHook as the native layer also uses startuphook to instrument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants