Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"bridge": {
"types": "Dependency"
},
"displayName": "Service depends on Service",
"labels": {
"forward": "depends on",
"reverse": "dependency of"
},
"source": {
"types": "Service"
},
"sourceConditions": [
{
"operator": "equals",
"sourceProperty": "rawId",
"targetProperty": "parent"
}
],
"target": {
"types": "Service"
},
"targetConditions": [
{
"operator": "equals",
"sourceProperty": "child",
"targetProperty": "rawId"
}
]
}
5 changes: 4 additions & 1 deletion plugins/Jaeger/v1/cspell.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"words": [
"jaeger",
"opentelemetry"
"opentelemetry",
"jsonpb",
"gogo",
"quantile"
]
}
29 changes: 10 additions & 19 deletions plugins/Jaeger/v1/dataStreams/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,23 @@
],
"baseDataSourceName": "httpRequestUnscoped",
"matches": "none",
"timeframes": [
"last1hour",
"last12hours",
"last24hours",
"last7days"
],
"timeframes": false,
"config": {
"httpMethod": "get",
"endpointPath": "/api/dependencies",
"pathToData": "data",
"getArgs": [
{
"key": "endTs",
"value": "{{timeframe.unixEnd * 1000}}"
},
{
"key": "lookback",
"value": "{{(timeframe.unixEnd - timeframe.unixStart) * 1000}}"
"value": "{{dataSource.dependencyStorage === 'spans' ? 3600000 : 172800000}}"
}
],
"headers": []
"headers": [],
"errorHandling": {
"type": "path",
"realm": "payload",
"path": "errors.0.msg"
}
},
"metadata": [
{
Expand Down Expand Up @@ -56,13 +52,8 @@
{
"thousandsSeparator": true
}
]
},
{
"name": "source",
"displayName": "Source",
"shape": "string",
"visible": false
],
"role": "value"
}
]
}
28 changes: 28 additions & 0 deletions plugins/Jaeger/v1/dataStreams/scripts/serviceCallRate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// dataStreams/scripts/serviceCallRate.js
//
// Jaeger serialises the metrics APIs with gogo's jsonpb marshaler, which gives
// a single MetricFamily in camelCase with default values omitted: a genuinely
// zero point arrives as an empty `gaugeValue: {}`, not as `doubleValue: 0`.
// Prometheus gaps come back as the string "NaN" (JSON has no NaN literal), so
// coerce and drop anything non-finite rather than charting it.
//
// Each row is one point of one series β€” calls per second.

const series = (data && data.metrics) || [];

result = _.filter(
_.flatMap(series, (s) => {
const labels = _.fromPairs((s.labels || []).map((l) => [l.name, l.value]));
return (s.metricPoints || []).map((point) => {
const gauge = point.gaugeValue || {};
const raw = gauge.doubleValue !== undefined ? gauge.doubleValue : gauge.intValue;
return {
timestamp: point.timestamp,
service: labels.service_name,
operation: labels.operation,
value: Number(raw === undefined ? 0 : raw),
};
});
}),
(row) => row.timestamp && Number.isFinite(row.value),
);
28 changes: 28 additions & 0 deletions plugins/Jaeger/v1/dataStreams/scripts/serviceErrorRate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// dataStreams/scripts/serviceErrorRate.js
//
// Jaeger serialises the metrics APIs with gogo's jsonpb marshaler, which gives
// a single MetricFamily in camelCase with default values omitted: a genuinely
// zero point arrives as an empty `gaugeValue: {}`, not as `doubleValue: 0`.
// Prometheus gaps come back as the string "NaN" (JSON has no NaN literal), so
// coerce and drop anything non-finite rather than charting it.
//
// Each row is one point of one series β€” error ratio.

const series = (data && data.metrics) || [];

result = _.filter(
_.flatMap(series, (s) => {
const labels = _.fromPairs((s.labels || []).map((l) => [l.name, l.value]));
return (s.metricPoints || []).map((point) => {
const gauge = point.gaugeValue || {};
const raw = gauge.doubleValue !== undefined ? gauge.doubleValue : gauge.intValue;
return {
timestamp: point.timestamp,
service: labels.service_name,
operation: labels.operation,
value: Number(raw === undefined ? 0 : raw),
};
});
}),
(row) => row.timestamp && Number.isFinite(row.value),
);
28 changes: 28 additions & 0 deletions plugins/Jaeger/v1/dataStreams/scripts/serviceLatency.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// dataStreams/scripts/serviceLatency.js
//
// Jaeger serialises the metrics APIs with gogo's jsonpb marshaler, which gives
// a single MetricFamily in camelCase with default values omitted: a genuinely
// zero point arrives as an empty `gaugeValue: {}`, not as `doubleValue: 0`.
// Prometheus gaps come back as the string "NaN" (JSON has no NaN literal), so
// coerce and drop anything non-finite rather than charting it.
//
// Each row is one point of one series β€” latency in milliseconds.

const series = (data && data.metrics) || [];

result = _.filter(
_.flatMap(series, (s) => {
const labels = _.fromPairs((s.labels || []).map((l) => [l.name, l.value]));
return (s.metricPoints || []).map((point) => {
const gauge = point.gaugeValue || {};
const raw = gauge.doubleValue !== undefined ? gauge.doubleValue : gauge.intValue;
return {
timestamp: point.timestamp,
service: labels.service_name,
operation: labels.operation,
value: Number(raw === undefined ? 0 : raw),
};
});
}),
(row) => row.timestamp && Number.isFinite(row.value),
);
93 changes: 93 additions & 0 deletions plugins/Jaeger/v1/dataStreams/serviceCallRate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"name": "serviceCallRate",
"displayName": "Service Call Rate",
"description": "Requests per second served by a service (requires Jaeger's metrics backend)",
"tags": [
"Performance"
],
"baseDataSourceName": "httpRequestScopedSingle",
"matches": {
"sourceType": {
"type": "equals",
"value": "Service"
}
},
"timeframes": [
"last1hour",
"last12hours",
"last24hours",
"last7days",
"last30days"
],
"config": {
"httpMethod": "get",
"endpointPath": "/api/metrics/calls",
"getArgs": [
{
"key": "service",
"value": "{{object.rawId}}"
},
{
"key": "endTs",
"value": "{{timeframe.unixEnd * 1000}}"
},
{
"key": "lookback",
"value": "{{(timeframe.unixEnd - timeframe.unixStart) * 1000}}"
},
{
"key": "step",
"value": "{{(timeframe.unixEnd - timeframe.unixStart) * 5}}"
},
{
"key": "groupByOperation",
"value": "{{groupByOperation || null}}"
}
],
"headers": [],
"postRequestScript": "serviceCallRate.js",
"errorHandling": {
"type": "path",
"realm": "payload",
"path": "errors.0.msg"
}
},
"ui": [
{
"name": "groupByOperation",
"label": "Split by operation",
"type": "checkbox",
"help": "Returns one series per operation instead of one for the service as a whole."
}
],
"metadata": [
{
"name": "timestamp",
"displayName": "Time",
"shape": "date",
"role": "timestamp"
},
{
"name": "service",
"displayName": "Service",
"shape": "string",
"role": "label"
},
{
"name": "operation",
"displayName": "Operation",
"shape": "string"
},
{
"name": "value",
"displayName": "Calls/sec",
"shape": [
"number",
{
"decimalPlaces": 2
}
],
"role": "value"
}
]
}
68 changes: 68 additions & 0 deletions plugins/Jaeger/v1/dataStreams/serviceDependencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"name": "serviceDependencies",
"displayName": "Service Dependencies",
"description": "Call dependencies into and out of a service, one row per parent-child pair",
"tags": [
"Services"
],
"baseDataSourceName": "httpRequestScopedSingle",
"matches": {
"sourceType": {
"type": "equals",
"value": "Service"
}
},
"timeframes": false,
"config": {
"httpMethod": "get",
"endpointPath": "/api/dependencies",
"pathToData": "data",
"getArgs": [
{
"key": "service",
"value": "{{object.rawId}}"
},
{
"key": "lookback",
"value": "{{dataSource.dependencyStorage === 'spans' ? 3600000 : 172800000}}"
}
],
"headers": [],
"errorHandling": {
"type": "path",
"realm": "payload",
"path": "errors.0.msg"
}
},
"metadata": [
{
"name": "key",
"displayName": "Dependency",
"computed": true,
"valueExpression": "{{ $['parent'] + ' -> ' + $['child'] }}",
"shape": "string",
"role": "label"
},
{
"name": "parent",
"displayName": "Parent Service",
"shape": "string"
},
{
"name": "child",
"displayName": "Child Service",
"shape": "string"
},
{
"name": "callCount",
"displayName": "Call Count",
"shape": [
"number",
{
"thousandsSeparator": true
}
],
"role": "value"
}
]
}
Loading
Loading