Class EnduserConfig
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.config.internal.EnduserConfig
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 Summary
Modifier and TypeMethodDescriptionbooleanReturns true if capturing of anyenduser.*semantic attribute is enabled.booleanReturns true if capturing theenduser.idsemantic attribute is enabled.booleanReturns true if capturing theenduser.rolesemantic attribute is enabled.booleanReturns true if capturing theenduser.scopesemantic attribute is enabled.
-
Method Details
-
isAnyEnabled
public boolean isAnyEnabled()Returns true if capturing of anyenduser.*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 theenduser.idsemantic attribute is enabled.- Returns:
- true if capturing the
enduser.idsemantic attribute is enabled.
-
isRoleEnabled
public boolean isRoleEnabled()Returns true if capturing theenduser.rolesemantic attribute is enabled.- Returns:
- true if capturing the
enduser.rolesemantic attribute is enabled.
-
isScopeEnabled
public boolean isScopeEnabled()Returns true if capturing theenduser.scopesemantic attribute is enabled.- Returns:
- true if capturing the
enduser.scopesemantic attribute is enabled.
-