Skip to main content

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

AttributeDescriptionExample
device.manufacturerDevice manufacturer"Apple", "Samsung"
device.model.nameModel name"iPhone 15 Pro", "Pixel 7"
device.model.identifierModel identifier"iPhone16,1"

OS

AttributeDescriptionExample
os.nameOS name"iOS", "Android"
os.versionOS version"17.4", "14"

App

AttributeDescriptionExample
service.nameApp name"MyApp"
service.versionApp version"2.1.0"
app.build_idBuild number"123"

Session

AttributeDescriptionExample
session.idCurrent session identifier"dce09977c69b0a5c15aa5fd01f817514"
screen.nameCurrent screen name"Home", "Profile"

screen.name shows 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