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

Make intake API support compressed spans #5485

Closed
AlexanderWert opened this issue Jun 17, 2021 · 2 comments
Closed

Make intake API support compressed spans #5485

AlexanderWert opened this issue Jun 17, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@AlexanderWert
Copy link
Member

AlexanderWert commented Jun 17, 2021

To make the compressed feature (elastic/apm#432) work we need to extend the intake API and adapt the calculation of span metrics (#5595).

Extend data model

We need to introduce a new property composite in the span intake data model.
The semantics is the following.

  • If this field is null, then the corresponding span is a normal span as before
  • If the compressed property is not null, then it's a compressed span
    • in this case the duration represents the sum of all compressed spans
    • the composite.count represents the number of spans that have been compressed into this single span
    • composite.end is the end timestamp of the last span --> end - timestamp is the overall duration of the compressed spans including any delays between the spans
    • composite.exact_match is a boolean that indicates whether the compressed spans are exact matches of each other or of the same kind (numerous alternating, fast queries to the same backend)
{
   "name": "SELECT FROM product_types WHERE user_id=?",
   "timestamp": 1613575086000000,
   "duration": 3781,
   "composite": {
       	"count": 10,
        "end": 1613575093183900,
        "exact_match": true
    }
}
@AlexanderWert
Copy link
Member Author

Resolved with #5661

@axw
Copy link
Member

axw commented Aug 26, 2021

Tested in #5661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants