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

feat: Add support for open telemetry #633

Merged
merged 17 commits into from Jun 17, 2021
Merged

Conversation

vi3k6i5
Copy link
Contributor

@vi3k6i5 vi3k6i5 commented May 20, 2021

Add support for open telemetry tracing if open telemetry is installed.
Added the same as extra dependency.

Also added unit tests for the same.

Follow up PR to add tracing in schema with related checks in unit tests. #648

Fixes #633 🦕

@vi3k6i5 vi3k6i5 requested a review from a team as a code owner May 20, 2021 12:46
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner-django API. label May 20, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label May 20, 2021
@snippet-bot
Copy link

snippet-bot bot commented Jun 11, 2021

No region tags are edited in this PR.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Copy link
Contributor

@c24t c24t left a comment

Choose a reason for hiding this comment

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

The way we're testing OT is kind of surprising, but that's largely OT's fault for being difficult to test. A few minor comments, but LGTM.

tests/_helpers.py Show resolved Hide resolved
tests/unit/django_spanner/simple_test.py Show resolved Hide resolved
django_spanner/_opentelemetry_tracing.py Outdated Show resolved Hide resolved
Copy link
Contributor

@larkee larkee left a comment

Choose a reason for hiding this comment

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

So this adds the trace_call method but does not add any calls. This means there is no tracing being added to the library. Is the intention for users to add trace calls themselves?

For the Spanner Client and the SQLAlchemy connector, we added tracing within the libraries. See here and here for more context.

@vi3k6i5
Copy link
Contributor Author

vi3k6i5 commented Jun 16, 2021

So this adds the trace_call method but does not add any calls. This means there is no tracing being added to the library. Is the intention for users to add trace calls themselves?

For the Spanner Client and the SQLAlchemy connector, we added tracing within the libraries. See here and here for more context.

So that will have to be a follow up PR, since this PR was already crossing 300 lines, I didn't add it here. Updated the description to reflect the same info.

@vi3k6i5 vi3k6i5 requested a review from larkee June 17, 2021 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner-django API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants