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

Logs Bridge API design #4696

Closed
pellared opened this issue Nov 8, 2023 · 6 comments · Fixed by #4809
Closed

Logs Bridge API design #4696

pellared opened this issue Nov 8, 2023 · 6 comments · Fixed by #4809
Assignees
Labels
area:logs Part of OpenTelemetry logs enhancement New feature or request proposal

Comments

@pellared
Copy link
Member

pellared commented Nov 8, 2023

Problem Statement

Design the following components in accordance to the OTel Specifcation (https://opentelemetry.io/docs/specs/otel/logs/):

  • Logs Bridge API
  • Logs SDK
  • slog.Handler implementation; log appender; bridge
  • Stdout exporter

Proposed Solution

Create a separate proposal PR which contains:

  1. A design document.
  2. A prototype implementation.

This issue is to track the whole proposal. It should be closed when the OTel Go maintainers and approvers accept the proposed design and prototype.

The prototype should have a PoC (happy-path; tests and proper error handling is not required) implementation of all components, with example and benchmarks. The main focus is on the API and performance. The prototype can have everything as a single Go module for ease of development.

After the proposal is accepted, the actual implementation will be built based on the prototype as many PRs with tests, benchmarks, and documentation.

Current design and prototype

Prior Art

Additional Context

It is worth to get all the lessons learned that the Go team had when they created slog:

It is important to notice that API design can affect performance (e.g. allocations).
It would be good to create benchmarks similar to https://github.com/golang/go/tree/master/src/log/slog
Reference: https://www.youtube.com/watch?v=tC4Jt3i62ns

@pellared pellared added enhancement New feature or request area:logs Part of OpenTelemetry logs proposal labels Nov 8, 2023
@pellared pellared moved this to Todo in Go: Logs (GA) Nov 8, 2023
@pellared
Copy link
Member Author

pellared commented Nov 8, 2023

@jba Do you want to participate (in any way you feel comfortable with) in adding logs to OpenTelemetry Go? I would be more than happy to get any feedback from you.

@jba
Copy link

jba commented Nov 8, 2023

Yes, I'd love to review the work related to slog.

@pellared pellared self-assigned this Nov 14, 2023
@pellared pellared moved this from Todo to In Progress in Go: Logs (GA) Nov 14, 2023
@cloorc
Copy link

cloorc commented Dec 20, 2023

Hi @pellared , I'm very interested in this feature lately. We are going to build a new system that will import full OpenTelemetry stack. But yesterday we found the latest opentelemtry-go SDK is still not supporting log report(to otel collector), however, our another team using opentelemetry-java, which has already supported.

I'm glad to help if there is anything I can do.

@MrAlias
Copy link
Contributor

MrAlias commented Dec 20, 2023

Hi @pellared , I'm very interested in this feature lately. We are going to build a new system that will import full OpenTelemetry stack. But yesterday we found the latest opentelemtry-go SDK is still not supporting log report(to otel collector), however, our another team using opentelemetry-java, which has already supported.

I'm glad to help if there is anything I can do.

@cloorc one thing to keep in mind is the OTel "logs implementation" is going to be a bridge that will back popular logging APIs. If you are using something like slog, logr, zap, ... there will likely be an OTel export pipeline built for these systems.

@cloorc
Copy link

cloorc commented Dec 22, 2023

Hi @pellared , I'm very interested in this feature lately. We are going to build a new system that will import full OpenTelemetry stack. But yesterday we found the latest opentelemtry-go SDK is still not supporting log report(to otel collector), however, our another team using opentelemetry-java, which has already supported.
I'm glad to help if there is anything I can do.

@cloorc one thing to keep in mind is the OTel "logs implementation" is going to be a bridge that will back popular logging APIs. If you are using something like slog, logr, zap, ... there will likely be an OTel export pipeline built for these systems.

Yeah, it sounds like what we are looking forward to. Thanks!

@pellared
Copy link
Member Author

pellared commented Feb 9, 2024

Closing per #4809.

New issues will be created e.g. for SDK design.

@pellared pellared closed this as completed Feb 9, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Go: Logs (GA) Feb 9, 2024
@pellared pellared changed the title Proposal: OpenTelemetry Logs OpenTelemetry Logs Bridge API design Feb 9, 2024
@pellared pellared changed the title OpenTelemetry Logs Bridge API design Logs Bridge API design Feb 9, 2024
@MrAlias MrAlias added this to the v1.24.0 milestone Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:logs Part of OpenTelemetry logs enhancement New feature or request proposal
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants