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 env var to control sending telemetry to appinsights in functions worker #1621

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

lzchen
Copy link
Member

@lzchen lzchen commented Dec 12, 2024

Follow up to #1509

We have decided to separate out the context propagation and enabling azure monitor functionality. To do this, we will be using a separate env var PYTHON_APPLICATIONINSIGHTS_ENABLE_TELEMETRY, which will be for strictly sending telemetry to appinsights and as well enabling context propagation. Future configuration of the telemetry SDK will most likely have the word _APPLICATIONINSIGHTS_ inside it's name.

We treating Opentelemetry context propagation as a separate feature. This will be controlled as an opt-in like before with PYTHON_ENABLE_OPENTELEMETRY env var.

@lzchen lzchen changed the title Add env var to control sending telemetry to appinsights in functions worker feat: Add env var to control sending telemetry to appinsights in functions worker Jan 2, 2025
@MatteoMilanese
Copy link

MatteoMilanese commented Jan 7, 2025

If both appinsights_app_setting and opentelemetry_app_setting are set to "true", configure_azure_monitor could be called twice, first by user then by Dispatcher.
Could this be a potential bug? In case it could be, shouldn't the settings be exclusive with opentelemetry_app_setting having higher priority?

@lzchen
Copy link
Member Author

lzchen commented Jan 13, 2025

@MatteoMilanese

configure_azure_monitor could be called twice, first by user then by Dispatcher.

Good question. We do not safeguard against double instrumentation as this is an unsupported scenario. We advise customers to either turn the appsetting on OR use configure_azure_monitor() in their code.

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