Package 

Class OpenTelemetryRumBuilder


  • 
    public final class OpenTelemetryRumBuilder
    
                        

    A builder of OpenTelemetryRum. It enabled configuring the OpenTelemetry SDK and disabling built-in Android instrumentations.

    This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

    • Method Detail

      • setResource

         OpenTelemetryRumBuilder setResource(Resource resource)

        Assign a Resource to be attached to all telemetry emitted by the created by this builder. This replaces any existing resource.

      • setCurrentNetworkProvider

         OpenTelemetryRumBuilder setCurrentNetworkProvider(CurrentNetworkProvider currentNetworkProvider)

        Call this to pass an existing CurrentNetworkProvider instance to share with the underlyingOpenTelemetry Rum instrumentation.

      • mergeResource

         OpenTelemetryRumBuilder mergeResource(Resource resource)

        Merges a new Resource with any existing Resource in this builder. Theresulting Resource will be attached to all telemetry emitted by the created by this builder.

      • addTracerProviderCustomizer

         OpenTelemetryRumBuilder addTracerProviderCustomizer(BiFunction<SdkTracerProviderBuilder, Application, SdkTracerProviderBuilder> customizer)

        Adds a BiFunction to invoke the with the SdkTracerProviderBuilder to allowcustomization. The return value of the BiFunction will replace the passed-inargument.

        Multiple calls will execute the customizers in order.

        Note: calling setResource inside of yourconfiguration function will cause any resource customizers to be ignored that were configuredvia setResource.

      • addAnrCustomization

         OpenTelemetryRumBuilder addAnrCustomization(Consumer<AnrDetectorBuilder> customizer)

        Pass a Consumer that will receive the AnrDetectorBuilder in order to perform additionalspecific customizations. If ANR detection is disabled, this method is effectively a no-op.

        Parameters:
        customizer - A Consumer that will receive the AnrDetectorBuilder before theAnrDetector is built.
      • addCrashReportingCustomization

         OpenTelemetryRumBuilder addCrashReportingCustomization(Consumer<CrashReporterBuilder> customizer)

        Pass a Consumer that will receive the CrashReporterBuilder in order to perform additionalspecific customizations. If crash reporting is disabled via config, this method iseffectively a no-op.

        Parameters:
        customizer - A Consumer that will recieve the CrashReporterBuilder before theCrashReporter is built.
      • addMeterProviderCustomizer

         OpenTelemetryRumBuilder addMeterProviderCustomizer(BiFunction<SdkMeterProviderBuilder, Application, SdkMeterProviderBuilder> customizer)

        Adds a BiFunction to invoke the with the SdkMeterProviderBuilder to allowcustomization. The return value of the BiFunction will replace the passed-inargument.

        Multiple calls will execute the customizers in order.

        Note: calling setResource inside of yourconfiguration function will cause any resource customizers to be ignored that were configuredvia setResource.

      • addLoggerProviderCustomizer

         OpenTelemetryRumBuilder addLoggerProviderCustomizer(BiFunction<SdkLoggerProviderBuilder, Application, SdkLoggerProviderBuilder> customizer)

        Adds a BiFunction to invoke the with the SdkLoggerProviderBuilder to allowcustomization. The return value of the BiFunction will replace the passed-inargument.

        Multiple calls will execute the customizers in order.

        Note: calling setResource inside of yourconfiguration function will cause any resource customizers to be ignored that were configuredvia setResource.

      • addPropagatorCustomizer

         OpenTelemetryRumBuilder addPropagatorCustomizer(Function<out Object, out TextMapPropagator> propagatorCustomizer)

        Adds a Function to invoke with the default TextMapPropagator to allowcustomization. The return value of the BiFunction will replace the passed-inargument. To add new propagators, use {@code TextMapPropagator.composite()} with the existingpropagator passed to your function.

        Multiple calls will execute the customizers in order.