[instrumentation] - Add integration tests#20462
Merged
maorleger merged 9 commits intoAzure:mainfrom Feb 28, 2022
Merged
Conversation
e2a6c84 to
953ff1b
Compare
joheredi
reviewed
Feb 22, 2022
joheredi
approved these changes
Feb 22, 2022
Member
joheredi
left a comment
There was a problem hiding this comment.
Looks good, I like the new test and how you are verifying that the call chain is correctly traced. Just left a small comment about the outer function name that threw me off initially when reading the tests.
xirzec
approved these changes
Feb 22, 2022
Member
xirzec
left a comment
There was a problem hiding this comment.
A few minor remarks, but I love that we're able to use more publicly provided goodies from OTel here.
adc293d to
599cbcd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages impacted by this PR
@azure/opentelemetry-instrumentation-azure-sdk
Issues associated with this PR
Resolves #18738
Describe the problem that is addressed by this PR
This PR solves the following:
tracing works as expected. The idea here is to ensure we do not regress in the
future when making core changes. I added a node-only integration test that uses
core-rest-pipeline and a fake client.
independently in multiple places. OpenTelemetry already provides testing utils
in their base package. I replaced our Test* objects with an InMemorySpanExporter
which allows us to grab all exported spans and inspect them.
packages that use the new naming conventions and core packages that use the old
naming conventions to pull az.namespace into a span. While it doesn't feel
appropriate to add compatibility code in our core packages, this package will be
in beta for quite some time so I think it's fine to add it here temporarily.
Are there test cases added in this PR? (If not, why?)
Lots and lots
Checklists