Skip to content

Support OTEL_PYTHON_DISABLED_INSTRUMENTATIONS#294

Merged
jeremydvoss merged 4 commits intomicrosoft:mainfrom
jeremydvoss:disable-instrumentations
Jun 15, 2023
Merged

Support OTEL_PYTHON_DISABLED_INSTRUMENTATIONS#294
jeremydvoss merged 4 commits intomicrosoft:mainfrom
jeremydvoss:disable-instrumentations

Conversation

@jeremydvoss
Copy link
Member

Using OTEL_PYTHON_DISABLED_INSTRUMENTATIONS functionality from auto instrumentation flow

@jeremydvoss jeremydvoss marked this pull request as ready for review June 14, 2023 17:20
@jeremydvoss jeremydvoss requested review from a team and lzchen as code owners June 14, 2023 17:20
- Fixing formatting issues for azure sdk
([#292](https://github.com/microsoft/ApplicationInsights-Python/pull/292))
- Support OTEL_PYTHON_DISABLED_INSTRUMENTATIONS
([#XXX](https://github.com/microsoft/ApplicationInsights-Python/pull/XXX))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
([#XXX](https://github.com/microsoft/ApplicationInsights-Python/pull/XXX))
([#294](https://github.com/microsoft/ApplicationInsights-Python/pull/294))

Copy link
Member Author

Choose a reason for hiding this comment

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

if lib_name not in _SUPPORTED_INSTRUMENTED_LIBRARIES_DEPENDENCIES_MAP:
continue
if entry_point.name in disabled_instrumentations:
_logger.debug(
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably should use _logger.info

Copy link
Member Author

Choose a reason for hiding this comment

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

Using debug because it matches the current use in sitecustomize.


def _default_disabled_instrumentations(configurations):
disabled_instrumentation = environ.get(
OTEL_PYTHON_DISABLED_INSTRUMENTATIONS, []
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add an entry to the README for this configuration?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated readme

Copy link
Contributor

@lzchen lzchen left a comment

Choose a reason for hiding this comment

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

Left a couple of comments.

@jeremydvoss jeremydvoss merged commit e66773b into microsoft:main Jun 15, 2023
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

Comments