You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This way, we can later run analysis how frequently compression fails, which can inform decisions about the compression strategy etc.
We can also eventually use this information to give users tips for improving their replay setup - if we detect a project has only events with fallback compression mode, we can prompt the user to either fix their CSP settings or disable compression, as an example.
Honestly, no preference here. I'd say on the event would be the easiest to set for us, not sure how it is on the ingestion side of things cc @cmanallen & @JoshFerge
@mydea@billyvg There are pros and cons to either event. I think on the replay-event is best. Will the value be static for the entire replay or will some segments be compressed and others not?
@mydea@billyvg There are pros and cons to either event. I think on the replay-event is best. Will the value be static for the entire replay or will some segments be compressed and others not?
I'd say as of now the value should be static, but it's not technically necessary/sure that it will be. In theory, it could change, e.g. if we decide to change the logic for what happens on compression errors (currently, we stop, but theoretically we could revert to sending uncompressed events, ...).
i would prefer adding to the replay recording headers payload and logging in our consumer, as it is quite a bit of work to make changes to our replay events consumer and add a clickhouse migration.
Honestly I'm fine putting it wherever you think it works best :) we can also put it into the event context if that's easier (not sure if/how we can query from there though?)
i would prefer adding to the replay recording headers payload and logging in our consumer, as it is quite a bit of work to make changes to our replay events consumer and add a clickhouse migration.
What would we need to add to the SDK header? Can we have a proposal on this issue? Seems like we can resolve this issu easily with this approach.
We could also add a flag to indicate whether default masking is on or off? Could help with: #7104 where the motivation is to understand how often folks go on manual PII stripping mode for the recording
This way, we can later run analysis how frequently compression fails, which can inform decisions about the compression strategy etc.
@mydea How are you defining failure here? Do you mean decompression in Relay or compression failures in the SDK? If decompression fails in Relay how does that inform compression strategy?
@bruno-garcia Any metrics calculations do not need to be logged. If we want to know what % of replays are masked by default it needs to go into Clickhouse or some other OLAP database.
clickhouse is not a great usecase for this as we have to manage the schema, migrations, etc. logging and BQ sink is much less operationally heavy and easy to do.
This way, we can later run analysis how frequently compression fails, which can inform decisions about the compression strategy etc.
@mydea How are you defining failure here? Do you mean decompression in Relay or compression failures in the SDK? If decompression fails in Relay how does that inform compression strategy?
This is client-side failure - we detect if we cannot load the web worker, and then fall back to uncompressed mode. Basically, the logic would be something like:
constmode=useCompression ? 'compressed' : 'disabled';if(useCompression){try{awaittryLoadCompressionWorker();}catch(error){mode='fallback';// fall back to uncompressed payloads}}
@mydea And with this data do you only want to know how often compression fails? Or would you like to correlate this data with projects, browsers, devices, sdk-versions, etc?
I think it would be helpful to be able to correlate this with esp. browser, device & sdk version information (e.g. to find out something like "compression fails esp. often for Safari on iOS").
To be clear, what we want to be able to take away from this is:
How frequently is this disabled? --> users have to manually do this! --> If this is very often, we should investigate why users disable this, as the goal should be that mostly it "just works" with compression.
How often does the web worker not work even though it is enabled? --> If this is very often, we should look into ways to improve this - why is it failing?
@mydea I would say the replay-event is the correct place to store this compression value. We do not have to ingest this into Clickhouse. If we're permitted, we could log in Relay or in our Snuba consumer (or just forward the message to a consumer owned wholly be replays and do whatever we want) and use @JoshFerge's suggestion to ingest this data into BigQuery. We can draw conclusions from there.
Relatedly, BQ would be a good place to run our maintenance queries (missing/duplicate segments query, etc.). We could run some really intensive stuff on it.
@mydea@billyvg unless this is determined super critical in the next week or two, i think the plan is to hold off until we make some refactors to the backend, which would make doing something like this very easy for us.
@mydea@billyvg unless this is determined super critical in the next week or two, i think the plan is to hold off until we make some refactors to the backend, which would make doing something like this very easy for us.
That's def. fine, just ping in here when there has been progress and we want to continue looking into this 👍
Activity
billyvg commentedon Feb 15, 2023
Should this be on the event, context, or the replay recording header (where we currently send segment ID?)
mydea commentedon Feb 16, 2023
Honestly, no preference here. I'd say on the event would be the easiest to set for us, not sure how it is on the ingestion side of things cc @cmanallen & @JoshFerge
cmanallen commentedon Feb 17, 2023
@mydea @billyvg There are pros and cons to either event. I think on the replay-event is best. Will the value be static for the entire replay or will some segments be compressed and others not?
mydea commentedon Feb 20, 2023
I'd say as of now the value should be static, but it's not technically necessary/sure that it will be. In theory, it could change, e.g. if we decide to change the logic for what happens on compression errors (currently, we stop, but theoretically we could revert to sending uncompressed events, ...).
bruno-garcia commentedon Feb 21, 2023
Similar to: https://github.com/getsentry/sentry-dotnet/blob/ad080333c2b104393aeb46ccd004147d2d645f1c/src/Sentry/SentryOptions.cs#L401
JoshFerge commentedon Feb 21, 2023
i would prefer adding to the replay recording headers payload and logging in our consumer, as it is quite a bit of work to make changes to our replay events consumer and add a clickhouse migration.
mydea commentedon Feb 22, 2023
Honestly I'm fine putting it wherever you think it works best :) we can also put it into the event context if that's easier (not sure if/how we can query from there though?)
bruno-garcia commentedon Feb 27, 2023
What would we need to add to the SDK header? Can we have a proposal on this issue? Seems like we can resolve this issu easily with this approach.
We could also add a flag to indicate whether default masking is on or off? Could help with: #7104 where the motivation is to understand how often folks go on manual PII stripping mode for the recording
cmanallen commentedon Feb 28, 2023
@mydea How are you defining failure here? Do you mean decompression in Relay or compression failures in the SDK? If decompression fails in Relay how does that inform compression strategy?
cmanallen commentedon Feb 28, 2023
@bruno-garcia Any metrics calculations do not need to be logged. If we want to know what % of replays are masked by default it needs to go into Clickhouse or some other OLAP database.
JoshFerge commentedon Feb 28, 2023
@cmanallen it is trivial to pipe GCP logs to bigquery which aggregation queries can be ran on.
JoshFerge commentedon Feb 28, 2023
clickhouse is not a great usecase for this as we have to manage the schema, migrations, etc. logging and BQ sink is much less operationally heavy and easy to do.
mydea commentedon Mar 1, 2023
This is client-side failure - we detect if we cannot load the web worker, and then fall back to uncompressed mode. Basically, the logic would be something like:
cmanallen commentedon Mar 1, 2023
@mydea And with this data do you only want to know how often compression fails? Or would you like to correlate this data with projects, browsers, devices, sdk-versions, etc?
mydea commentedon Mar 1, 2023
I think it would be helpful to be able to correlate this with esp. browser, device & sdk version information (e.g. to find out something like "compression fails esp. often for Safari on iOS").
To be clear, what we want to be able to take away from this is:
cmanallen commentedon Mar 1, 2023
@mydea I would say the replay-event is the correct place to store this compression value. We do not have to ingest this into Clickhouse. If we're permitted, we could log in Relay or in our Snuba consumer (or just forward the message to a consumer owned wholly be replays and do whatever we want) and use @JoshFerge's suggestion to ingest this data into BigQuery. We can draw conclusions from there.
Relatedly, BQ would be a good place to run our maintenance queries (missing/duplicate segments query, etc.). We could run some really intensive stuff on it.
billyvg commentedon Mar 1, 2023
Let's take josh's recommendation and add it to the replay recording headers?
JoshFerge commentedon Mar 2, 2023
@mydea @billyvg unless this is determined super critical in the next week or two, i think the plan is to hold off until we make some refactors to the backend, which would make doing something like this very easy for us.
mydea commentedon Mar 3, 2023
That's def. fine, just ping in here when there has been progress and we want to continue looking into this 👍