Skip to content

Conversation

@pellared
Copy link
Member

@pellared pellared commented Nov 19, 2025

Fixes #4357
Fixes #4661

Changes

Add optional Ergonomic API that it is better suited for direct usage by instrumentation libraries, instrumented libraries, and applications.

Prototype

Go: https://github.com/pellared/olog

@pellared pellared self-assigned this Nov 19, 2025
@pellared pellared added area:api Cross language API specification issue spec:logs Related to the specification/logs directory labels Nov 19, 2025
@pellared pellared moved this to In Review in Logs SIG Nov 19, 2025
@pellared pellared marked this pull request as ready for review November 19, 2025 09:18
@pellared pellared requested review from a team as code owners November 19, 2025 09:18

**Logger** - all methods are safe to be called concurrently.

## Ergonomic API
Copy link
Member

Choose a reason for hiding this comment

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

we probably don't need a new section just to document something obvious (IMHO) to each language implementations. Languages were always free to offer extra helpers for all sort of things, and I think that is not prohibited in the spec.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd like to highlight a few points:

  1. Issue Confusing purpose for logging API #4661 demonstrates real confusion - The contradiction in the opening paragraphs confused contributors. This suggests the freedom isn't as "obvious" as we might think. Moreover, based on the discussions during the specification SIG meeting, others also shared concerns in the current way the specification is written.

  2. The section provides guidance, not just permission - It's not just saying "you can do this" (which may be implicit), but "here's what to focus on when you do this" (semconv compliance, idiomatic design).

  3. Precedent exists - The Configuration spec explicitly states languages should provide idiomatic mechanisms. This follows that pattern.

  4. Small documentation cost, significant clarity benefit - The section is brief (~5 lines) but resolves confusion that led to an issue being filed.

Would you prefer we:

  • A) Keep the section as-is
  • B) Move it to supplementary-guidelines.md instead
  • C) Reduce it to a single sentence in the opening
  • D) Something else?

I'm open to alternatives that achieve the clarity goal while addressing your concern about documenting the "obvious."

Copy link
Member

Choose a reason for hiding this comment

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

My preference is : C

Copy link
Member Author

Choose a reason for hiding this comment

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

I am fine with C. Let's see wait for more feedback.

Copy link
Member Author

Choose a reason for hiding this comment

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

I also updated the README.md so that this PR will be self-sufficient for solving the issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

During today's Spec SIG meeting it seemed that the attendees preference was: A

@pellared pellared requested a review from cijothomas November 19, 2025 17:34
applications, which is particularly important for:

- **Instrumentation libraries** to avoid coupling to a particular logging library.
- **Emitting structured logs and events** following [semantic conventions](https://opentelemetry.io/docs/specs/semconv/),
Copy link
Member

Choose a reason for hiding this comment

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

nit: this is possible with logging libraries too. So may be specify that "this is the case when an existing logging library does not allow structure log or ability to specify event name"/similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

Addressed b10da75

@pellared pellared requested a review from cijothomas November 20, 2025 19:23
@pellared
Copy link
Member Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

area:api Cross language API specification issue spec:logs Related to the specification/logs directory

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Confusing purpose for logging API Introduce Ergonomic API

2 participants