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

chore(eap-spans): Add a field to suggest consumers to ingest spans in EAP #4206

Merged
merged 10 commits into from
Nov 4, 2024

Conversation

phacops
Copy link
Contributor

@phacops phacops commented Oct 31, 2024

We would like to have span ingestion into the EAP behind a feature flag. Snuba doesn't support runtime configuration for Rust consumers so the idea here is to have a Flagpole feature tell us whether or not we should ingest.

getsentry/sentry#80064
getsentry/snuba#6486

@phacops phacops requested a review from a team as a code owner October 31, 2024 18:48
@phacops phacops self-assigned this Oct 31, 2024
@phacops phacops requested a review from jjbayer October 31, 2024 18:48
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you implement this as an unserialized item header, as we did for replays?

/// Indicates that this item should be combined into one payload with other replay item.
/// NOTE: This is internal-only and not exposed into the Envelope.
#[serde(default, skip)]
replay_combined_payload: bool,

@phacops phacops requested a review from jjbayer November 4, 2024 12:20
@@ -1,6 +1,6 @@
---
source: relay-server/src/metrics_extraction/event.rs
expression: "(&event.value().unwrap().spans, metrics)"
expression: "(&event.value().unwrap().spans, metrics.project_metrics)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, where did this come from?

relay-server/src/services/store.rs Outdated Show resolved Hide resolved
@@ -330,6 +342,7 @@ pub fn extract_from_event(
item.set_payload(ContentType::Json, span);
// If metrics extraction happened for the event, it also happened for its spans:
item.set_metrics_extracted(state.event_metrics_extracted);
item.set_ingest_span_in_eap(ingest_in_eap);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could make the header an envelope header and set it in a more central place (e.g. process_envelope), so we don't have to set it in two different code paths. Given this is temporary it does not really matter though.

@phacops phacops merged commit f87db88 into master Nov 4, 2024
23 checks passed
@phacops phacops deleted the pierre/eap-spans-add-ingest-in-eap-field-to-spans branch November 4, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants