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

SNOW-1462014: Ability to disable OTel span creation even if opentelemetry is installed #1730

Open
mikeldking opened this issue Jun 4, 2024 · 9 comments
Labels
feature New feature or request status-triage_done Initial triage done, will be further handled by the driver team

Comments

@mikeldking
Copy link

What is the current behavior?

If opentelemetry is installed, spans are automatically emitted via https://github.com/snowflakedb/snowpark-python/blob/29b3bba9a7bd13206221b6fc6ad9ed0fae853fe0/src/snowflake/snowpark/_internal/open_telemetry.py

What is the desired behavior?

Add the ability to disable span creation even if opentelemetry is installed so as to keep the trace hierarchy simpler.

How would this improve snowflake-snowpark-python?

Make it more configurable and more composable with other OTel instrumentations

References, Other Background

OTel gives you the ability to turn off different instrumentations like so: https://github.com/snowflakedb/snowpark-python/blob/29b3bba9a7bd13206221b6fc6ad9ed0fae853fe0/src/snowflake/snowpark/_internal/open_telemetry.py

@mikeldking mikeldking added the feature New feature or request label Jun 4, 2024
@github-actions github-actions bot changed the title Ability to disable OTel span creation even if opentelemetry is installed SNOW-1462014: Ability to disable OTel span creation even if opentelemetry is installed Jun 4, 2024
@sfc-gh-yuwang
Copy link
Collaborator

Hi, do you just want to be able to disable all snowpark emit spans, or you also want to have control on what function should not emit span? For example, do you want snowpark to emit span on .collect() while not emitting span on .show() ?

@mikeldking
Copy link
Author

@sfc-gh-yuwang thanks so much for responding! For now I think it's an overall switch-off (@trevor-laviale-arize might be able to chime in here)

@trevor-laviale-arize
Copy link

Yeah I think just the ability to disable in general is good for now :)

@sfc-gh-yuwang
Copy link
Collaborator

Got it, will do this recently, I am thinking about having a environment variable to turn on/off snowpark opentelemetry

@trevor-laviale-arize
Copy link

Amazing, thanks so much!

@mikeldking
Copy link
Author

Thanks @sfc-gh-yuwang - env var makes a ton of sense

@sfc-gh-sghosh sfc-gh-sghosh added the status-triage_done Initial triage done, will be further handled by the driver team label Jun 10, 2024
@sfc-gh-yuwang
Copy link
Collaborator

I want to do a quick update on this issue, we are now discussing with other teams who potentially could have the issue about a uniform solution across snowflake, we should have this solved within this month

@sfc-gh-jfreeberg
Copy link
Collaborator

@mikeldking , @trevor-laviale-arize -- Have you tried setting this env var? OTEL_PYTHON_DISABLED_INSTRUMENTATIONS ?

https://opentelemetry.io/docs/zero-code/python/configuration/#disabling-specific-instrumentations

@sfc-gh-yuwang
Copy link
Collaborator

I also find that opentelemetry has recently added a feature of trace config: open-telemetry/opentelemetry-specification#3877 , can you also try it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

5 participants