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

Insert calls to runtime.StartSpan in APIs #954

Merged
merged 14 commits into from
Jun 2, 2023

Conversation

jhendrixMSFT
Copy link
Member

This requries using named return values in APIs so that the deferred call to endSpan() can capture the error.

@jhendrixMSFT
Copy link
Member Author

Fixes #501

This requries using named return values in APIs so that the deferred
call to endSpan() can capture the error.
Copy link
Member

@chlowell chlowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this repo the best place for a simple end-to-end test verifying a generated client started and ended a span as expected? (I guess that could go in a management plane test suite instead)

packages/autorest.go/src/generator/operations.ts Outdated Show resolved Hide resolved
@jhendrixMSFT
Copy link
Member Author

Will add tests to verify spans are properly ended.

updated autorest go.mod to use the beta of azcore
generate some content without --inject-spans to ensure it works
@jhendrixMSFT jhendrixMSFT merged commit 9b902e7 into Azure:main Jun 2, 2023
@jhendrixMSFT jhendrixMSFT deleted the tracing_codegen branch June 2, 2023 15:18
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.

2 participants