Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new replay context to the context protocol #1792

Closed
cmanallen opened this issue Jan 30, 2023 · 4 comments
Closed

Add new replay context to the context protocol #1792

cmanallen opened this issue Jan 30, 2023 · 4 comments
Assignees
Labels
maintenance Tasks with this label generally have a lower priority and due date

Comments

@cmanallen
Copy link
Member

cmanallen commented Jan 30, 2023

This can go into a separate PR, but we should add this new Context to the protocol. see for example

pub struct BrowserContext {
/// Display name of the browser application.
pub name: Annotated<String>,
/// Version string of the browser.
pub version: Annotated<String>,
/// Additional arbitrary fields for forwards compatibility.
#[metastructure(additional_properties, retain = "true", pii = "maybe")]
pub other: Object<Value>,
}

Originally posted by @jjbayer in #1791 (comment)

@jan-auer
Copy link
Member

jan-auer commented Feb 6, 2023

The information in this context seems to contain metadata on sampling. This information is usually not stored in the event payload but rather in special metadata keys (either _meta or _metrics). To resolve this issue, @cmanallen please:

  1. List fields and data types that are part of this context
  2. Describe how these fields are used in the product

We may need to move some of these fields to other places in the payload.

@cmanallen
Copy link
Member Author

@jan-auer The fields are supplied to relay as a "replay" object within the "contexts" object containing two keys with float values.

{
    "contexts": {
        "replay": {
            "error_sample_rate": f64,
            "session_sample_rate": f64
        }
        ...
    }
}

The values are not used within the product and are instead used for internal metrics calculations. @mydea knows more and can give more details on usage.

@jernejstrasner jernejstrasner added the maintenance Tasks with this label generally have a lower priority and due date label Mar 23, 2023
@jernejstrasner jernejstrasner removed this from the Maintenance milestone Mar 23, 2023
@JoshFerge
Copy link
Member

JoshFerge commented Mar 30, 2023

I am running into this now in #1983 as I didn't realize we already were setting things in the context. I think that we shouldn't store these on the replay context, and need to rethink these fields. let's discuss soon.

@jjbayer
Copy link
Member

jjbayer commented Jul 24, 2023

@cmanallen is this still relevant? Closing because of age, feel free to reopen.

@jjbayer jjbayer closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Tasks with this label generally have a lower priority and due date
Projects
None yet
Development

No branches or pull requests

7 participants