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 span.id field to transactions #82

Closed
AlexanderWert opened this issue Jun 21, 2023 · 3 comments · Fixed by #112
Closed

Add span.id field to transactions #82

AlexanderWert opened this issue Jun 21, 2023 · 3 comments · Fixed by #112
Assignees
Milestone

Comments

@AlexanderWert
Copy link
Member

We want to converge span and transaction data models. For that, all transaction documents should also have a span.id field (where the field value is a copy of transaction.id).
This also will allow better correlation between logs and arbitrary spans (that are either spans or transactions) for OTel use cases.

OTel log records know about the span.id they belong to. However, if they are not tied to spans as SpanEvents, there's no way to tell whether the span.id in a log record belongs to a span document or a transaction. So, in case of transaction the correlation breaks, because we query for span.id = XYZ while transactions do not have a span.id field at all.

@SylvainJuge
Copy link
Member

SylvainJuge commented Jun 27, 2023

We have to cover the following types of documents / data flows:

  • transaction documents from traces sent by agents (1)
  • logs sent directly to apm-server by apm-agents (1)
  • logs that are ingested through filebeat or similar (2)

For (1) it's mostly copying the value of transaction.id to span.id, however for (2) that might get a bit trickier as apm-data is not involved in writing those documents. In this case could we rely on an ingest pipeline or equivalent ?

This would allow to help fixing #40

@AlexanderWert
Copy link
Member Author

For (1) it's mostly copying the value of transaction.id to span.id, however for (2) that might get a bit trickier as apm-data is not involved in writing those documents. In this case could we rely on an ingest pipeline or equivalent ?

I'd propose to ignore (2) for now.

(2) could be solved by apm-agents / logging-libraries by always writing a span.id, even for logs relate to a transaction (in that case span.id = transaction.id).

@SylvainJuge
Copy link
Member

Very good point for (2), this provides a good reason for doing this change across all APM agents.

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 a pull request may close this issue.

3 participants