Package io.opentelemetry.api.events
Interface EventEmitterBuilder
public interface EventEmitterBuilder
Builder class for creating
EventEmitter instances.
EventEmitters are identified by their scope name, version, and schema URL. These
identifying fields, along with attributes, combine to form the instrumentation scope, which is
attached to all events produced by the EventEmitter.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Gets or creates aEventEmitterinstance.setEventDomain(String eventDomain) Sets the event domain.setInstrumentationVersion(String instrumentationScopeVersion) Sets the instrumentation scope version of the resultingEventEmitter.setSchemaUrl(String schemaUrl) Set the scope schema URL of the resultingEventEmitter.
-
Method Details
-
setEventDomain
Sets the event domain. Event domain is not part ofEventEmitteridentity.- 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
Set the scope schema URL of the resultingEventEmitter. Schema URL is part ofEventEmitteridentity.- Parameters:
schemaUrl- The schema URL.- Returns:
- this
-
setInstrumentationVersion
Sets the instrumentation scope version of the resultingEventEmitter. Version is part ofEventEmitteridentity.- Parameters:
instrumentationScopeVersion- The instrumentation scope version.- Returns:
- this
-
build
EventEmitter build()Gets or creates aEventEmitterinstance.- Returns:
- a
EventEmitterinstance configured with the provided options.
-