-
Notifications
You must be signed in to change notification settings - Fork 935
[Logs] Add optional Ergonomic API #4741
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
base: main
Are you sure you want to change the base?
Changes from 8 commits
3f414f0
62a752d
99bb74a
8139964
56f27f8
d3f5fb6
4e5a198
fe8c5fe
b10da75
0bb6e78
3f62fd0
9ad04f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ aliases: [bridge-api] | |
|
|
||
| # Logs API | ||
|
|
||
| **Status**: [Stable](../document-status.md) | ||
| **Status**: [Stable](../document-status.md), except where otherwise specified | ||
|
|
||
| <details> | ||
| <summary>Table of Contents</summary> | ||
|
|
@@ -23,6 +23,7 @@ aliases: [bridge-api] | |
| * [Enabled](#enabled) | ||
| - [Optional and required parameters](#optional-and-required-parameters) | ||
| - [Concurrency requirements](#concurrency-requirements) | ||
| - [Ergonomic API](#ergonomic-api) | ||
| - [References](#references) | ||
|
|
||
| <!-- tocstop --> | ||
|
|
@@ -35,7 +36,8 @@ which use this API to bridge between existing logging libraries and the | |
| OpenTelemetry log data model. | ||
|
|
||
| The Logs API can also be directly called by instrumentation libraries | ||
| as well as instrumented libraries or applications. | ||
| as well as instrumented libraries or applications. However, languages are also | ||
| free to provide a more [ergonomic API](#ergonomic-api) for direct usage. | ||
|
|
||
| The Logs API consist of these main components: | ||
|
|
||
|
|
@@ -167,6 +169,20 @@ specific guarantees and safeties. | |
|
|
||
| **Logger** - all methods are safe to be called concurrently. | ||
|
|
||
| ## Ergonomic API | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to highlight a few points:
Would you prefer we:
I'm open to alternatives that achieve the clarity goal while addressing your concern about documenting the "obvious."
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My preference is : C
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am fine with C. Let's see wait for more feedback.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also updated the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| **Status**: [Development](../document-status.md) | ||
|
|
||
| Languages MAY additionally provide a more ergonomic and convenient logging API | ||
| that it is better suited for direct usage by instrumentation libraries, | ||
| instrumented libraries, and applications. | ||
|
|
||
| The ergonomic API SHOULD make it easier to emit logs and events following the | ||
| [log semantics](https://opentelemetry.io/docs/specs/semconv/general/logs/) | ||
| and the [event semantics](https://opentelemetry.io/docs/specs/semconv/general/events/). | ||
|
|
||
| The design of the ergonomic API SHOULD be idiomatic for its language. | ||
|
|
||
| ## References | ||
|
|
||
| - [OTEP0150 Logging Library SDK Prototype Specification](../../oteps/logs/0150-logging-library-sdk.md) | ||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed b10da75