Expand description
Profiling protocol and processing for Sentry.
Profiles are captured during the life of a transaction on Sentry clients and sent to Relay for ingestion as JSON objects with some metadata. They are sent alongside a transaction (usually in the same envelope) and are usually big objects (average size around 300KB and it’s not unusual to see several MB). Their size is linked to the amount of code executed during the transaction (so the duration of the transaction influences the size of the profile).
It’s preferrable to have a profile with a transaction. If a transaction is dropped, the profile should be dropped as well.
§Envelope
§Transaction Profiling
To send a profile of a transaction to Relay, the profile is enclosed in an item of type
profile:
{"type": "profile", "size": ...}
{ ... }§Continuous Profiling
For continuous profiling, we expect to receive chunks of profile in an item of type
profile_chunk:
{"type": "profile_chunk"}
{ ... }§Protocol
Each item type expects a different format.
For Profile item type, we expect the Sample format v1 or Android format.
For ProfileChunk item type, we expect the Sample format v2.
§Ingestion
Relay will forward those profiles encoded with msgpack after unpacking them if needed and push a message on Kafka.
Structs§
- Android
Profile Chunk - Perfetto
Profile Chunk - A parsed Perfetto profiling chunk.
- Profile
Metadata - Parsed profile metadata returned from
parse_metadata. - V2Profile
Chunk
Enums§
- Android
OrV2 Profile Chunk - Either an
AndroidProfileChunkor aV2ProfileChunk. - AnyProfile
Chunk - Supported profile chunks for continous profiling.
- Profile
Error - Profile
Type - Determines the type/use of a
ProfileChunk.
Traits§
- Profile
Chunk - Minimum interface all profile chunk types must implement.
Functions§
Type Aliases§
- Profile
Id - Unique identifier for a profile.