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

Change sdk class constructors to accept NV pairs without first argument #154

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

duncanpo
Copy link
Member

@duncanpo duncanpo commented Sep 4, 2024

Change constructor of a number of sdk classes to accept option name-value pairs without specifying the first inputs. For example, to specify options for opentelemetry.sdk.trace.TracerProvider, it used to require the first input which is a span processor:
tp = TracerProvider(processor, option1_name, option1_value, option2_name, option2_value, ...)

With this change, the first input can be omitted:
tp = TracerProvider(option1_name, option1_value, option2_name, option2_value, ...)

The list of changed classes:
opentelemetry.sdk.trace.TracerProvider
opentelemetry.sdk.trace.BatchSpanProcessor
opentelemetry.sdk.metrics.MeterProvider
opentelemetry.sdk.metrics.PeriodicExportingMetricReader
opentelemetry.sdk.logs.LoggerProvider
opentelemetry.sdk.logs.BatchLogRecordProcessor

closes #22

@duncanpo duncanpo self-assigned this Sep 4, 2024
@duncanpo duncanpo merged commit 6af9e20 into main Sep 4, 2024
5 checks passed
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.

Support specifying metric reader properties without specifying the metrics exporter
1 participant