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

example/dice: Use resource.NewSchemaless instead of resource.NewWithAttributes #4846

Closed

Conversation

pellared
Copy link
Member

@pellared pellared commented Jan 22, 2024

Why

See: open-telemetry/opentelemetry.io#3838 (comment)

What

Use resource.NewSchemaless instead of resource.NewWithAttributes to mitigate the "resource merge conflict" runtime error that the users encounter have when bumping OTel Go when they are using the existing "getting started" example (https://opentelemetry.io/docs/languages/go/getting-started/#initialize-the-opentelemetry-sdk).

Related to #2341

@pellared pellared added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Jan 22, 2024
@dmathieu
Copy link
Member

With this change, we will likely end up with most users not using the schema version. Is that the signal we want to provide?
Should there be a documentation section explaining both and the pros/cons of each, so we could link to it?

@pellared
Copy link
Member Author

Should there be a documentation section explaining both and the pros/cons of each, so we could link to it?

That may be good especially until we have something like #4503 (which I do not expect to happen soon).

How about doing it in a separate PR? Are you willing to help with it?

@MrAlias
Copy link
Contributor

MrAlias commented Jan 22, 2024

With this change, we will likely end up with most users not using the schema version. Is that the signal we want to provide?

Right, I agree that is not the message we want to send users. I think this takes a step in the wrong direction.

@pellared
Copy link
Member Author

pellared commented Jan 22, 2024

I have a different idea. I think we can just use resource.Default() and set OTEL_SERVICE_NAME and OTEL_RESOURCE_ATTRIBUTES here: https://opentelemetry.io/docs/languages/go/getting-started/#run-the-application.

I will create a separate PR later this week. Changing this one to draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants