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

Registry and factories for Exporters and Aggregators #801

Closed
jmacd opened this issue Jun 8, 2020 · 1 comment
Closed

Registry and factories for Exporters and Aggregators #801

jmacd opened this issue Jun 8, 2020 · 1 comment
Labels
enhancement New feature or request pkg:SDK Related to an SDK package

Comments

@jmacd
Copy link
Contributor

jmacd commented Jun 8, 2020

Any efforts to build a configurable SDK for tracing or metrics will have to directly link all their dependencies. This will create large binaries that include lots of unused code. For example, a configurable metric SDK might be able to apply the DDSketch algorithm, but it will be undesirable to include that code if it is not used.

We will need a way to locate exporters (Tracing and Metrics) and aggregators (only Metrics) without a direct dependency, but code constructed through a factory will also require a way to configure itself. The otel-collector has built a framework for this using spf13/viper, but (a) it's a manual effort (spf13/viper doesn't offer much help) and (b) it's not clear that spf13/viper is a suitable dependency. Maybe the mitchellh/mapstructure package is suitable.

(Possibly this problem is not large enough that it matters to Tracing SDKs. We have e.g., #796 adding support for environment variable configuration, so perhaps no "configurable tracing SDK" is needed, meaning to switch between OTLP and Jaeger requires recompiling.)

To close this issue, at least for metrics, we should have a way to locate a named Aggregator implementation and configure it from an external source, somehow. The metrics aggregators that require configuration are Histogram and DDSketch. All of the metrics exporters require configuration. Until this is possible, it will be difficult to construct a realistic configurable SDK--we'll have to take every dependency instead.

@MrAlias MrAlias added pkg:SDK Related to an SDK package enhancement New feature or request labels Jul 2, 2020
@MrAlias MrAlias added this to the RC1 milestone Sep 25, 2020
@MrAlias MrAlias removed this from the RC1 milestone Feb 16, 2021
@MrAlias
Copy link
Contributor

MrAlias commented Oct 20, 2022

This looks like it will be resolved with open-telemetry/opentelemetry-go-contrib#2753

@jmacd jmacd closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:SDK Related to an SDK package
Projects
None yet
Development

No branches or pull requests

2 participants