Skip to content

update go services to use otel config package#3003

Open
codeboten wants to merge 4 commits intoopen-telemetry:mainfrom
codeboten:codeboten/use-otel-config-go
Open

update go services to use otel config package#3003
codeboten wants to merge 4 commits intoopen-telemetry:mainfrom
codeboten:codeboten/use-otel-config-go

Conversation

@codeboten
Copy link
Contributor

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.md updated to document new feature additions
  • Appropriate documentation updates in the docs
  • Appropriate Helm chart updates in the helm-charts

Maintainers 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.

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>
@github-actions github-actions bot added the helm-update-required Requires an update to the Helm chart when released label Feb 18, 2026
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
Signed-off-by: alex boten <223565+codeboten@users.noreply.github.com>
@codeboten codeboten marked this pull request as ready for review February 18, 2026 22:12
@codeboten codeboten requested a review from a team as a code owner February 18, 2026 22:12
Copy link
Contributor

@rogercoll rogercoll left a comment

Choose a reason for hiding this comment

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

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}
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct?
I'd expect the temporality_preference to be configured on the meter_provider, not on the tracer_provider.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, should be in meter_provider

@julianocosta89
Copy link
Member

@codeboten Is the config file the recommended way of configuring the SDK?
I'm asking because the docs do not mention the config file at all: https://opentelemetry.io/docs/languages/go/instrumentation/

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?!

@MikeGoldsmith
Copy link
Member

@codeboten Is the config file the recommended way of configuring the SDK? I'm asking because the docs do not mention the config file at all: https://opentelemetry.io/docs/languages/go/instrumentation/

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.

@codeboten
Copy link
Contributor Author

As we have 2 go services we could maybe use config file in one, and manual config on the other. WDYT?!

Updating one of them to use config and leave one without config makes sense to me, the documentation update is coming as well :)

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

helm-update-required Requires an update to the Helm chart when released Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants