Interface EventLoggerBuilder

All Known Implementing Classes:
DefaultEventLoggerProvider.NoopEventLoggerBuilder, SdkEventLoggerProvider.SdkEventLoggerBuilder

public interface EventLoggerBuilder
Builder class for creating EventLogger instances.

EventLoggers 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 EventLogger.

  • Method Details

    • setSchemaUrl

      EventLoggerBuilder setSchemaUrl(String schemaUrl)
      Set the scope schema URL of the resulting EventLogger. Schema URL is part of EventLogger identity.
      Parameters:
      schemaUrl - The schema URL.
      Returns:
      this
    • setInstrumentationVersion

      EventLoggerBuilder setInstrumentationVersion(String instrumentationScopeVersion)
      Sets the instrumentation scope version of the resulting EventLogger. Version is part of EventLogger identity.
      Parameters:
      instrumentationScopeVersion - The instrumentation scope version.
      Returns:
      this
    • build

      EventLogger build()
      Gets or creates a EventLogger instance.
      Returns:
      a EventLogger instance configured with the provided options.