Skip to content

Conversation

@jpkrohling
Copy link
Member

Signed-off-by: Juraci Paixão Kröhling juraci@kroehling.de

  • I have read and followed the Contributing docs, especially the "First-time contributing?" section.
  • This PR has content that I did not fully write myself.
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR.1

Footnotes

  1. Yes, I can answer maintainer questions about the content of this PR, without using AI.

Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
@jpkrohling jpkrohling requested a review from a team as a code owner January 23, 2026 17:08
@otelbot-docs otelbot-docs bot requested review from a team January 23, 2026 17:08
@jpkrohling
Copy link
Member Author

@tedsuo shared a reddit post a few days ago with me (https://www.reddit.com/r/ExperiencedDevs/comments/1ow8c61/opentelemetry_worth_the_effort/ ) and one of the comments linked to the getting started guide for Go, which was overly complex and not representative of what I believe people should be doing. The getting started guide is what I personally do in my projects and how I teach people on my other projects.

Before merging, it would be good to have someone from the config sig (@codeboten ?) to review, as well as someone from the Go SIG (@pellared ?) to keep me honest.

jpkrohling and others added 2 commits January 23, 2026 18:11
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
@svrnm
Copy link
Member

svrnm commented Jan 26, 2026

That's great, is this also relevant for open-telemetry/opentelemetry-go-contrib#8099 ?

Copy link
Member

@pellared pellared left a comment

Choose a reason for hiding this comment

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

Our policy so far was to always update the code in https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples/dice and then update the docs here.

// Set up OpenTelemetry.
otelShutdown, err := setupOTelSDK(ctx)
// Set up OpenTelemetry SDK from configuration file.
cfgBytes, err := os.ReadFile("otel.yaml")
Copy link
Member

Choose a reason for hiding this comment

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

I think we are not closing the file. The linter in the OTel repository should catch this.

@jpkrohling
Copy link
Member Author

I talked to @pellared on Slack, asking whether publishing the code from this PR to the the dice example at the canonical reference would be accepted. It's not very clear to me, given his concerns about the stability of the otelconf package.

Before investing more time on this, I'd really need some clarity on whether this code, as is (plus closing the read file), would be accepted there. If it would, I'll gladly send the PR to update that, otherwise I'd prefer to close this here, given the limited time I have for this specific task.

@dmathieu
Copy link
Member

Could we keep the changes, except for the use of otelconf?

@jpkrohling
Copy link
Member Author

otelconf is a key part of this change, is what really simplifies the setting up of the SDK from 100+ lines to a few.

Create `otel.yaml` with the following configuration:

```yaml
file_format: '0.3'
Copy link
Member

Choose a reason for hiding this comment

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

I believe you should be able to use rc.2 these days: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/Makefile#L326

@jpkrohling
Copy link
Member Author

Folks, I'm not sure how to move forward, can you help me? Is this change something you'd be interested in having? Or should I close it?

I think this is a question for @dmathieu / @pellared .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

8 participants