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

Add test to ensure domain-neutral is working #1234

Merged
merged 10 commits into from
Sep 21, 2022

Conversation

pjanotti
Copy link
Contributor

Why

To ensure that domain-neutral instrumentation is not broke by unrelated changes.

It doesn't "fix" #1134 directly, however, after adding strong name support an assembly properly registered on the GAC can be loaded as domain-neutral for bytecode instrumentations. In light of that will close #1134 when this PR is merged.

What

Add a test to ensure domain-neutral bytecode instrumentation is working. Since domain-neutral depends on the assembly to be registered on the GAC and that requires strong name, the test is very similar to the strong name test recently added.

  • Added a test to validate that domain-neutral is working. It requires GAC registration so it must be run as admin.
  • Changed the target of the strong named validation to a test library so both strong name and domain-neutral can use a single instrumentation target.
  • Add brackets to app domain name log statements in the native code since the names can contain white spaces.

Tests

Added a new test: DomainNeutralTests.

Checklist

- [ ] CHANGELOG.md is updated.
- [ ] Documentation is updated.
- [ ] New features are covered by tests.

@pjanotti pjanotti requested a review from a team September 15, 2022 16:13
@pjanotti
Copy link
Contributor Author

pjanotti commented Sep 15, 2022

🤔 Hum, the strong name test failed on this run: https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/runs/3062693118/jobs/4943951142#step:4:3392

I may need to add some synchronization to ensure that the span is exported and received.

[Edit 09/16/22]: More failures of the same test, created #1242

@pjanotti pjanotti mentioned this pull request Sep 15, 2022
@pjanotti pjanotti enabled auto-merge (squash) September 20, 2022 17:38
@pjanotti pjanotti merged commit 5b3fb8c into open-telemetry:main Sep 21, 2022
@pjanotti pjanotti deleted the fx-app-domain-support branch June 2, 2023 20:02
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 this pull request may close these issues.

AutoInstrumentation assembly not loaded as domain-neutral
5 participants