Session Tracking
The most basic Instrumentation feature is tracking sessions of the injected application.
Configuration
To track sessions:
Enable the following Instrumentation options for your Dotfuscator config:
Using either in-code attributes or extended attributes, add the following to your code:
A
SetupAttribute
on a method indicative of your application starting.A
TeardownAttribute
on a method whose exit is indicative of your application ending.A
BusinessAttribute
and anApplicationAttribute
on the assembly containing theSetupAttribute
.
Configure the properties of these attributes appropriately.
Build your Dotfuscator config.
The output assemblies will now contain injected code for session tracking.
Supported Application Types
Session tracking can be used on methods within all assemblies supported by instrumentation.
Messages
There are two message types generated for session tracking: Session Start and Session Stop.
Additionally, the SignOfLifeAttribute
generates a third type, Sign of Life.
Note: Some PreEmptive Analytics APIs make a distinction between an "application run" and a "session". The code injected by Dotfuscator treats them as the same thing and sends additional application run messages alongside the session messages specified.
Session Start
Generated when a method annotated with SetupAttribute
begins and the user has not opted-out.
Indicates the start of the session.
Includes the following data:
- Session ID
- Timestamp
- User name (hashed to remove PII)
- .NET Runtime version
- OS information
- Name
- Installation date
- Locale (e.g.,
en-US
)
Session Stop
Generated when a method annotated with TeardownAttribute
ends and the user did not opt-out at setup time.
Indicates the end of the session.
Includes the following data:
- Session ID
- Timestamp
- User name (hashed to remove PII)
- .NET Runtime version
- OS information
- Name
- Installation date
- Locale (e.g.,
en-US
)
Sign of Life
Generated when a method annotated with SignOfLifeAttribute
begins.
Indicates that the application is being run.
A Shelf Life Activation Key is required to use this feature.
Includes the following data:
- Session ID
- Timestamp
- Shelf Life Activation Key ID
Note: When the Analytics Version option is v4 (the default), this message will instead appear to endpoints as a Feature Tick Message with the name "ShelfLife.SignOfLife".