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

Enable OpenTelemetry for Desktop target in xUnit tests #18233

Merged
merged 5 commits into from
Jan 15, 2025

Conversation

majocha
Copy link
Contributor

@majocha majocha commented Jan 13, 2025

Turns out building trace provider involves some assemblies being dynamically loaded. That's what kept failing previously.

We do install an assembly resolver in the app domain for desktop target but it was installed later than the call to CreateTracerProviderBuilder. In effect Otel couldn't load some assemblies during startup. With this PR the call to AssemblyResolver.addResolver happens earlier.

Copy link
Contributor

✅ No release notes required

@majocha majocha marked this pull request as ready for review January 14, 2025 09:13
@majocha majocha requested a review from a team as a code owner January 14, 2025 09:13
@psfinaki
Copy link
Member

Nice job @majocha! If you have a minute, could you share some Jaeger telemetry from tests, how it looks like right now on your machine?

@majocha
Copy link
Contributor Author

majocha commented Jan 14, 2025

Sure!
A selection of tests started in VS:
image
Detail:
image

This is after some more clean-up that is beyond scope of this PR. Currently StackGuard pollutes the traces with lots of additional noise.

This is with Jaeger v2 running in docker.

@psfinaki
Copy link
Member

Nice! Yeah running Jaeger in docker in what we usually do. Good stuff, we can have this in and reduce noise separately.

@T-Gro T-Gro merged commit 9b34544 into dotnet:main Jan 15, 2025
33 checks passed
@majocha majocha deleted the tests-otel-2 branch January 15, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants