Class UserConfig
enduser.* or user.* semantic
attributes.
When the v3 preview is enabled, this configuration reads the corresponding user.*
properties instead. Legacy enduser.* properties and their associated attributes are not
supported when v3 preview is enabled.
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
configuring the following properties:
otel.instrumentation.common.enduser.id.enabled=true otel.instrumentation.common.enduser.role.enabled=true otel.instrumentation.common.enduser.scope.enabled=true
When v3 preview is enabled, capturing of the user.* semantic attributes can be
individually enabled by configuring the following properties:
otel.instrumentation.common.user.name.enabled=true otel.instrumentation.common.user.roles.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 any identity semantic attribute is enabled.booleanReturns true if capturing the id semantic attribute is enabled.booleanReturns true if capturing the role(s) semantic attribute is enabled.booleanReturns true if capturing theenduser.scopesemantic attribute is enabled.
-
Method Details
-
isAnyEnabled
public boolean isAnyEnabled()Returns true if capturing of any identity semantic attribute is enabled.This flag can be used by capturing instrumentations to bypass all identity attribute capturing. In v3 preview mode, this corresponds to the
user.*attributes; otherwise it corresponds to theenduser.*attributes. -
isNameEnabled
public boolean isNameEnabled()Returns true if capturing the id semantic attribute is enabled.In v3 preview mode, this controls the
user.nameattribute; otherwise it controls theenduser.idattribute. -
isRolesEnabled
public boolean isRolesEnabled()Returns true if capturing the role(s) semantic attribute is enabled.In v3 preview mode, this controls the
user.rolesattribute; otherwise it controls theenduser.roleattribute. -
isScopeEnabled
public boolean isScopeEnabled()Returns true if capturing theenduser.scopesemantic attribute is enabled.This is always disabled in v3 preview mode, since
enduser.scopehas nouser.*equivalent.
-