-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pull the plug on breakdown metrics (#384)
* pull the plug on breakdown metrics
- Loading branch information
1 parent
edaf005
commit 5a2b10c
Showing
8 changed files
with
73 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
### Breakdown metrics | ||
|
||
Status: feature has been disabled and code is only kept for future reference. | ||
|
||
Breakdown metrics currently require a custom Elasticsearch ingest pipeline. | ||
|
||
``` | ||
PUT _ingest/pipeline/metrics-apm.app@custom | ||
{ | ||
"processors": [ | ||
{ | ||
"script": { | ||
"lang": "painless", | ||
"source": """ | ||
if(ctx.span == null){ | ||
ctx.span = [:]; | ||
} | ||
if(ctx.transaction == null){ | ||
ctx.transaction = [:]; | ||
} | ||
if(ctx.labels != null){ | ||
if(ctx.labels.elastic_span_type != null){ | ||
ctx.span.type = ctx.labels.elastic_span_type; | ||
} | ||
if(ctx.labels.elastic_span_subtype != null){ | ||
ctx.span.subtype = ctx.labels.elastic_span_subtype; | ||
} | ||
if(ctx.labels.elastic_local_root_type != null){ | ||
ctx.transaction.type = ctx.labels.elastic_local_root_type; | ||
} | ||
if(ctx.labels.elastic_local_root_name != null){ | ||
ctx.transaction.name = ctx.labels.elastic_local_root_name; | ||
} | ||
} | ||
if(ctx.numeric_labels != null && ctx.numeric_labels.elastic_span_self_time != null){ | ||
def value = ctx.numeric_labels.elastic_span_self_time/1000; | ||
def sum = [ 'us': value]; | ||
ctx.span.self_time = [ 'count': 0, 'sum': sum]; | ||
} | ||
""" | ||
} | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters