-
Notifications
You must be signed in to change notification settings - Fork 43
core-logs: add LogRecordBuilder #1018
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
Conversation
* @see | ||
* [[https://opentelemetry.io/docs/specs/otel/logs/data-model/]] | ||
*/ | ||
trait LogRecordBuilder[F[_], Ctx] { |
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.
That's the unfortunate part.
The spec explicitly says the API must accept the Context
:
The Context associated with the LogRecord. When implicit Context is supported, then this parameter SHOULD be optional and if unspecified then MUST use current Context. When only explicit Context is supported, this parameter SHOULD be required.
@NthPortal could you please take a look at it once you have a moment? |
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.
I'm so sorry for taking so long.
I'm a bit concerned that this part of the spec is listed as having the "Development" status, but this code does seem to follow the spec.
my only concern is that it seems to be missing a way to add an EventName
That's a fair concern. If I understand correctly, only the attribute-conversion API is under development.
The log record builder API accepts logs attributes, which is basically
And there is a problem. Even if we define I think at this point we should follow
Hm, indeed. Let me add this one. |
Done. I added the |
The spec: https://opentelemetry.io/docs/specs/otel/logs/api/#emit-a-logrecord