Global Attributes
Attach contextual metadata to every span, event, and log the SDK emits.
Automatic Attributes
The SDK automatically attaches the following to all telemetry. Exact fields vary by platform.
Device
| Attribute | Description | Example |
|---|---|---|
device.manufacturer | Device manufacturer | "Apple", "Samsung" |
device.model.name | Model name | "iPhone 15 Pro", "Pixel 7" |
device.model.identifier | Model identifier | "iPhone16,1" |
OS
| Attribute | Description | Example |
|---|---|---|
os.name | OS name | "iOS", "Android" |
os.version | OS version | "17.4", "14" |
App
| Attribute | Description | Example |
|---|---|---|
service.name | App name | "MyApp" |
service.version | App version | "2.1.0" |
app.build_id | Build number | "123" |
Session
| Attribute | Description | Example |
|---|---|---|
session.id | Current session identifier | "dce09977c69b0a5c15aa5fd01f817514" |
screen.name | Current screen name | "Home", "Profile" |
screen.nameshows React Native screen names when Navigation tracking is set up, otherwise falls back to native activity/view controller names.
Custom Global Attributes
Set key/value pairs that are attached to all subsequent telemetry:
import { Pulse } from '@dreamhorizonorg/pulse-react-native';
Pulse.setGlobalAttribute('environment', 'production');
Pulse.setGlobalAttribute('release_channel', 'beta');
Pulse.setGlobalAttribute('feature_flags', ['dark_mode', 'new_checkout']);
Supported value types: string, number, boolean, and arrays of these.
Scope
Custom attributes set via setGlobalAttribute apply to JS-layer telemetry (custom events, spans, JS errors). Native telemetry (ANR, native crashes, activity lifecycle) includes device/OS/app attributes automatically but not custom JS attributes.
Next Steps
- Data Collection Consent — Gate collection behind consent