Conversation
tigrannajaryan
left a comment
There was a problem hiding this comment.
Do you think my proposal to keep/rename SdkLogEmitterProvider->SdkLogRecordEmitterProvider and SdkLogEmitter->SdkLogRecordEmitter is reasonable?
So we will have:
- LoggerProvider and Logger that can be used to create events and exceptions.
- SdkLogRecordEmitterProvider and SdkLogRecordEmitter that can be used to produce any log records.
| * <p>Obtain a {@link LogRecordBuilder} via {@link Logger#eventBuilder(String)}, add properties using the | ||
| * setters, and emit the event by calling {@link #emit()}. | ||
| */ | ||
| public interface LogRecord { |
There was a problem hiding this comment.
Do we want to make LogRecord part of public API?
Do we want to have both LogRecord with setters and LogRecordBuilder?
| * @param additionalAttributes the additional {@link Attributes} to record. | ||
| * @return this. | ||
| */ | ||
| LogRecord recordException(Throwable t, Attributes additionalAttributes); |
There was a problem hiding this comment.
Will this create a LogRecord with attributes defined here? https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/exceptions.md
Do we omit event.name for exceptions? Does this mean "exception" is not an "event"?
There was a problem hiding this comment.
This is confusing but I think there is no issue here. The span event have exception as the value of the name field, and in LogRecords, exception events will have an attribute event.name with value exception.
Span.Event -> {
name: exception
}
LogRecord -> {
attributes: {
event.name: exception
}
}
No description provided.