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

sdk/log: Document that users should not create instances of Record #5823

Closed
pellared opened this issue Sep 16, 2024 · 1 comment · Fixed by #5871
Closed

sdk/log: Document that users should not create instances of Record #5823

pellared opened this issue Sep 16, 2024 · 1 comment · Fixed by #5871
Assignees
Labels
documentation Provides helpful information enhancement New feature or request pkg:SDK Related to an SDK package
Milestone

Comments

@pellared
Copy link
Member

Users are expected to emit logs using this API: https://pkg.go.dev/go.opentelemetry.io/otel/log (or a bridge using it).

The SDK is not designed to create https://pkg.go.dev/go.opentelemetry.io/otel/sdk/log#Record themselves. The record is created by the Logger returned by https://pkg.go.dev/go.opentelemetry.io/otel/sdk/log#LoggerProvider.Logger.

Originally posted by @pellared in #5782 (comment)

@pellared pellared added enhancement New feature or request pkg:SDK Related to an SDK package documentation Provides helpful information labels Sep 16, 2024
@pellared
Copy link
Member Author

We should document that users should not create instances of https://pkg.go.dev/go.opentelemetry.io/otel/sdk/log#Record by themselves and that https://pkg.go.dev/go.opentelemetry.io/otel/sdk/log/logtest#RecordFactory can be used for testing purposes.

@pellared pellared self-assigned this Oct 3, 2024
@pellared pellared moved this from Todo to In Progress in Go: Logs (GA) Oct 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Go: Logs (GA) Oct 4, 2024
@XSAM XSAM added this to the untracked milestone Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Provides helpful information enhancement New feature or request pkg:SDK Related to an SDK package
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants