update go services to use otel config package#3003
update go services to use otel config package#3003codeboten wants to merge 4 commits intoopen-telemetry:mainfrom
Conversation
This updates the checkout and product-catalog services to use the go.opentelemetry.io/contrib/otelconf package to instantiate the logger, meter, and tracer providers. Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
rogercoll
left a comment
There was a problem hiding this comment.
Awesome! 🚀 Would you mind adding a changelog entry?
(For Helm we will need to create and mount a config map)
| exporter: | ||
| otlp_grpc: | ||
| endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT} | ||
| temporality_preference: ${OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:-cumulative} |
There was a problem hiding this comment.
Is this correct?
I'd expect the temporality_preference to be configured on the meter_provider, not on the tracer_provider.
There was a problem hiding this comment.
Yeah, should be in meter_provider
|
@codeboten Is the config file the recommended way of configuring the SDK? Don't get me wrong, I like it, and we can easily re-use the config across all services, but it would be nice to have some common recommendation across the project. As we have 2 go services we could maybe use config file in one, and manual config on the other. WDYT?! |
The configuration files is a newer project and part of the OpenTelemetry Specification. It's close to being marked stable, with implementations in Java, Go & JS and other languages are in WIP. We're hoping config files will be the standard way to configure SDKs going forward. |
Updating one of them to use config and leave one without config makes sense to me, the documentation update is coming as well :) |
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Changes
This updates the checkout and product-catalog services to use the go.opentelemetry.io/contrib/otelconf package to instantiate the logger, meter, and tracer providers.
Merge Requirements
For new features contributions, please make sure you have completed the following
essential items:
CHANGELOG.mdupdated to document new feature additionsMaintainers will not merge until the above have been completed. If you're unsure
which docs need to be changed ping the
@open-telemetry/demo-approvers.