Package io.opentelemetry.api.logs
Interface LoggerBuilder
public interface LoggerBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Gets or creates aLoggerinstance.setEventDomain(String eventDomain) Set the event domain of the resultingLogger.setInstrumentationVersion(String instrumentationScopeVersion) Sets the instrumentation scope version of the resultingLogger.setSchemaUrl(String schemaUrl) Set the scope schema URL of the resultingLogger.
-
Method Details
-
setEventDomain
Set the event domain of the resultingLogger.NOTE: Event domain is required to use
Logger.eventBuilder(String).The event domain will be included in the
event.domainattribute of every event produced by the resultingLogger.- Parameters:
eventDomain- The event domain, which acts as a namespace for event names. Within a particular event domain, event name defines a particular class or type of event.- Returns:
- this
-
setSchemaUrl
- Parameters:
schemaUrl- The schema URL.- Returns:
- this
-
setInstrumentationVersion
- Parameters:
instrumentationScopeVersion- The instrumentation scope version.- Returns:
- this
-
build
Logger build()Gets or creates aLoggerinstance.- Returns:
- a
Loggerinstance configured with the provided options.
-