Global Attributes
Global attributes are automatically attached to all telemetry (spans, events, logs) throughout the session.
Automatic Attributes
The SDK includes these automatically:
Device: device.model.name, device.model.identifier, device.manufacturer
OS: os.name ("Android"), os.type ("linux"), os.version, os.api_level
App: service.name (from AndroidManifest), service.version, rum.sdk.version
Session: session.id
Custom Global Attributes
Pass a globalAttributes lambda to initialize(). These are merged with automatic attributes:
PulseSDK.INSTANCE.initialize(
application = this,
apiKey = "your-api-key",
dataCollectionState = PulseDataCollectionConsent.ALLOWED,
globalAttributes = {
Attributes.builder()
.put("deployment.environment", if (BuildConfig.DEBUG) "development" else "production")
.put("app.version.name", BuildConfig.VERSION_NAME)
.put("app.version.code", BuildConfig.VERSION_CODE.toString())
.build()
}
)
Event or span-level attributes take precedence over global attributes when keys conflict.
Next Steps
- Data Collection Consent — Control when telemetry is exported
- API Reference — Full
PulseSDKmethod signatures