-
Notifications
You must be signed in to change notification settings - Fork 78
Remove most code configuration #277
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
Conversation
0f25e0b to
fe17ac8
Compare
fe17ac8 to
c09dd05
Compare
a0d43c3 to
1a85a17
Compare
90a5b99 to
80472be
Compare
| dep_mock.assert_called_with(ep2_mock.dist) | ||
| ep_mock.load.assert_not_called() | ||
| ep2_mock.load.assert_called_once() | ||
| instrumentor_mock.instrument.assert_called_once() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diff turned out weird, but if you expand below, you'll see that I mainly just removed test_setup_instrumentations_lib_excluded, test_setup_instrumentations_custom_configuration, and test_setup_instrumentations_custom_configuration_excluded
| | `OTEL_METRICS_EXPORTER` | If set to `None`, disables collection and export of metric telemetry. | | ||
| | `OTEL_LOGS_EXPORTER` | If set to `None`, disables collection and export of distributed tracing telemetry. | | ||
| | `OTEL_BLRP_SCHEDULE_DELAY` | Specifies the logging export interval in milliseconds. Defaults to 5000. | | ||
| | `OTEL_TRACES_SAMPLER_ARG` | Specifies the ratio of distributed tracing telemetry to be [sampled][application_insights_sampling]. Accepted values are in the range [0,1]. Defaults to 1.0, meaning no telemetry is sampled out. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Switch the ordering of the last two so OTEL_x_SCHEDULE_DELAY variables are grouped together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| logger_name = configurations[LOGGER_NAME_ARG] | ||
| logging_level = configurations[LOGGING_LEVEL_ARG] | ||
| def _setup_logging(configurations: Dict[str, ConfigurationValue]): | ||
| # TODO: Remove after upgrading to 1.18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean upgrading to opentelemetry-sdk 1.18 because it's in the latest release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specified
| def configure_azure_monitor(**kwargs) -> None: | ||
| """ | ||
| This function works as a configuration layer that allows the | ||
| end user to configure OpenTelemetry and Azure monitor components. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need InstrumentationConfig type above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Will remove.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
LGTM except a few comments. |
Co-authored-by: Leighton Chen <[email protected]>
Co-authored-by: Leighton Chen <[email protected]>
e2abb45 to
97fb414
Compare
Removing the following parameters for configure_azure_monitor:
Configuration for some of these items will still be possible through env vars.