Skip to content

Instantly share code, notes, and snippets.

@ebuildy
Created April 12, 2022 06:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebuildy/52e6a82e98bc686706d02dab9733f172 to your computer and use it in GitHub Desktop.
Save ebuildy/52e6a82e98bc686706d02dab9733f172 to your computer and use it in GitHub Desktop.
PUT _transform/test
{
"source": {
"index": [
"apm-*-span"
],
"query": {
"bool": {
"filter": [
{
"term": {
"agent.name": "rum-js"
}
},
{
"wildcard": {
"destination.address": "*XXX.com"
}
},
{
"terms": {
"span.type": [
"external",
"resource"
]
}
}
]
}
}
},
"dest": {
"index": "test",
"pipeline": "rollup_web_infra"
},
"frequency": "10m",
"sync": {
"time": {
"field": "@timestamp",
"delay": "60m"
}
},
"pivot": {
"group_by": {
"@timestamp": {
"date_histogram": {
"field": "@timestamp",
"calendar_interval": "1h"
}
},
"source.country_name": {
"terms": {
"field": "client.geo.country_name"
}
},
"source.region_name": {
"terms": {
"field": "client.geo.region_name"
}
},
"service.name": {
"terms": {
"field": "service.name"
}
},
"destination.address": {
"terms": {
"field": "destination.address"
}
},
"span.subtype": {
"terms": {
"field": "span.subtype"
}
}
},
"aggregations": {
"duration.us.max": {
"max": {
"field": "span.duration.us"
}
},
"duration.us.percentiles": {
"percentiles": {
"field": "span.duration.us",
"percents": [
50,
75,
95,
99
]
}
},
"transactions_count": {
"cardinality": {
"field": "transaction.id"
}
},
"traces_count": {
"value_count": {
"field": "trace.id"
}
}
}
},
"description": "Web to infra servers HTTP calls",
"settings": {
"max_page_search_size": 500
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment