Package com.dynatrace.agent.api
Class SessionPropertyEventData
java.lang.Object
com.dynatrace.agent.api.SessionPropertyEventData
Holds the configuration for a session property event to be sent via the
Dynatrace#sendSessionPropertyEvent.
Configure the event by specifying the desired session properties. Session
properties must have keys prefixed with "session_properties.". Any property without this prefix will be
dropped.
OneAgent will verify the reported monitoring data based on the Semantic Dictionary. Invalid fields will be removed and invalid events will be dropped.
Example (Kotlin)
Dynatrace.sendSessionPropertyEvent(
SessionPropertyEventData()
.addSessionProperty("session_properties.userId", "12345")
)
- Since:
- 8.329
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new session property event configuration to be sent viaDynatrace#sendSessionPropertyEvent. -
Method Summary
Modifier and TypeMethodDescriptionaddSessionProperty(String key, boolean value) Adds a user session property with aBooleanvalue.addSessionProperty(String key, double value) Adds a user session property with aDoublevalue.addSessionProperty(String key, int value) Adds a session property with anIntegervalue.addSessionProperty(String key, long value) Adds a user session property with aLongvalue.addSessionProperty(String key, String value) Adds a session property with aStringvalue.
-
Constructor Details
-
SessionPropertyEventData
public SessionPropertyEventData()Creates a new session property event configuration to be sent viaDynatrace#sendSessionPropertyEvent.
-
-
Method Details
-
addSessionProperty
Adds a session property with aStringvalue.- Parameters:
key- name of the session property. Has to start with "session_properties." or it will be droppedvalue- property value- Returns:
- this instance for chaining
-
addSessionProperty
Adds a session property with anIntegervalue.- Parameters:
key- name of the session property. Has to start with "session_properties." or it will be droppedvalue- property value- Returns:
- this instance for chaining
-
addSessionProperty
Adds a user session property with aLongvalue.- Parameters:
key- name of the session property. Has to start with "session_properties." or it will be droppedvalue- property value- Returns:
- this instance for chaining
-
addSessionProperty
Adds a user session property with aDoublevalue.Note:
Double.NaN,Double.POSITIVE_INFINITYorDouble.NEGATIVE_INFINITYare not allowed and will be dropped- Parameters:
key- name of the session property. Has to start with "session_properties." or it will be droppedvalue- property value- Returns:
- this instance for chaining
-
addSessionProperty
Adds a user session property with aBooleanvalue.- Parameters:
key- name of the session property. Has to start with "session_properties." or it will be droppedvalue- property value- Returns:
- this instance for chaining
-