Class EnduserConfig

java.lang.Object
io.opentelemetry.javaagent.bootstrap.internal.EnduserConfig

public class EnduserConfig extends Object
Configuration that controls capturing the enduser.* semantic attributes.

The enduser.* semantic attributes are not captured by default, due to this text in the specification:

Given the sensitive nature of this information, SDKs and exporters SHOULD drop these attributes by default and then provide a configuration parameter to turn on retention for use cases where the information is required and would not violate any policies or regulations.

Capturing of the enduser.* semantic attributes can be individually enabled by configured the following properties:

 otel.instrumentation.common.enduser.id.enabled=true
 otel.instrumentation.common.enduser.role.enabled=true
 otel.instrumentation.common.enduser.scope.enabled=true
 

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

  • Method Details

    • isAnyEnabled

      public boolean isAnyEnabled()
      Returns true if capturing of any enduser.* semantic attribute is enabled.

      This flag can be used by capturing instrumentations to bypass all enduser.* attribute capturing.

    • isIdEnabled

      public boolean isIdEnabled()
      Returns true if capturing the enduser.id semantic attribute is enabled.
      Returns:
      true if capturing the enduser.id semantic attribute is enabled.
    • isRoleEnabled

      public boolean isRoleEnabled()
      Returns true if capturing the enduser.role semantic attribute is enabled.
      Returns:
      true if capturing the enduser.role semantic attribute is enabled.
    • isScopeEnabled

      public boolean isScopeEnabled()
      Returns true if capturing the enduser.scope semantic attribute is enabled.
      Returns:
      true if capturing the enduser.scope semantic attribute is enabled.