Crate relay_profiling

source ·
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.

Enums§

Functions§

Type Aliases§