Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(metrics): Consistent transaction.status [INGEST-1416] #1333

Merged
merged 5 commits into from
Jul 7, 2022

Conversation

jjbayer
Copy link
Member

@jjbayer jjbayer commented Jul 6, 2022

In store normalization, we set contexts.trace.status to unknown in case it is missing from the trace context.
In metrics extraction, which runs before normalization, we simply ignored a missing status. Align.

  • This does not increase dimensionality, since the bucket ..., status=none will now move to bucket ..., status=unknown.
  • There is already a static string for unknown in the indexer, so this will not increase indexer storage.

Future Work

To reduce code duplication, carve out the parts of store normalization that are needed for metrics extraction and put it something like a PreMetricsProcessor that runs before extraction.

let span_status = trace_context.status.value()?;
Some(span_status.to_string())
fn extract_transaction_status(trace_context: &TraceContext) -> SpanStatus {
*trace_context.status.value().unwrap_or(&SpanStatus::Unknown)
Copy link
Member Author

Choose a reason for hiding this comment

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

For reference:

fn process_trace_context(
&mut self,
context: &mut TraceContext,
_meta: &mut Meta,
_state: &ProcessingState<'_>,
) -> ProcessingResult {
context
.status
.value_mut()
.get_or_insert(SpanStatus::Unknown);
Ok(())
}

@jjbayer jjbayer changed the title Fix/transaction status fix(metrics): Consistent transaction.status [INGEST-1416] Jul 7, 2022
@jjbayer jjbayer marked this pull request as ready for review July 7, 2022 07:45
@jjbayer jjbayer requested a review from a team July 7, 2022 07:45
@jjbayer jjbayer merged commit 0d825c0 into master Jul 7, 2022
@jjbayer jjbayer deleted the fix/transaction-status branch July 7, 2022 12:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants