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

[APM] feat(plugins-apm): add metrics dashboard for opentelemetry-node services #174700

Merged
merged 9 commits into from
Jan 28, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

export const AGENT_NAME_DASHBOARD_FILE_MAPPING: Record<string, string> = {
nodejs: 'nodejs',
'opentelemetry/nodejs': 'opentelemetry-nodejs',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would use opentelemetry_nodejs (underscore) similar to the filename for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

java: 'java',
};

Expand All @@ -22,6 +23,12 @@ export async function loadDashboardFile(filename: string): Promise<any> {
'./nodejs.json'
);
}
case 'opentelemetry-nodejs': {
return import(
/* webpackChunkName: "lazyNodeJsDashboard" */
'./opentelemetry_nodejs.json'
);
}
case 'java': {
return import(
/* webpackChunkName: "lazyJavaDashboard" */
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"optionsJSON":"{\"useMargins\":true,\"syncColors\":false,\"syncCursor\":true,\"syncTooltips\":false,\"hidePanelTitles\":false}","panelsJSON":"[{\"version\":\"8.10.2\",\"type\":\"lens\",\"gridData\":{\"x\":0,\"y\":0,\"w\":24,\"h\":15,\"i\":\"f3de253a-8c79-46d0-acb2-05eef8d056be\"},\"panelIndex\":\"f3de253a-8c79-46d0-acb2-05eef8d056be\",\"embeddableConfig\":{\"attributes\":{\"title\":\"\",\"description\":\"\",\"visualizationType\":\"lnsXY\",\"type\":\"lens\",\"references\":[{\"type\":\"index-pattern\",\"id\":\"metrics-*\",\"name\":\"indexpattern-datasource-layer-ed2c0b0b-d8c5-415d-aec6-7681d578d3db\"}],\"state\":{\"visualization\":{\"legend\":{\"isVisible\":true,\"position\":\"bottom\",\"shouldTruncate\":true},\"valueLabels\":\"hide\",\"fittingFunction\":\"None\",\"axisTitlesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"preferredSeriesType\":\"line\",\"layers\":[{\"layerId\":\"ed2c0b0b-d8c5-415d-aec6-7681d578d3db\",\"accessors\":[\"8a334ede-47b6-4eae-aeea-1e2bcc472f94\",\"3b9cf7ee-613d-4c9c-8a1b-5fca7fdc5dc7\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857\"],\"position\":\"top\",\"seriesType\":\"line\",\"showGridlines\":false,\"layerType\":\"data\",\"xAccessor\":\"719ac5fd-a2f0-4bf3-8dbc-c00357e96228\"}],\"yTitle\":\"Usage [bytes]\"},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"datasourceStates\":{\"formBased\":{\"layers\":{\"ed2c0b0b-d8c5-415d-aec6-7681d578d3db\":{\"columns\":{\"719ac5fd-a2f0-4bf3-8dbc-c00357e96228\":{\"label\":\"@timestamp\",\"dataType\":\"date\",\"operationType\":\"date_histogram\",\"sourceField\":\"@timestamp\",\"isBucketed\":true,\"scale\":\"interval\",\"params\":{\"interval\":\"auto\",\"includeEmptyRows\":true,\"dropPartials\":false}},\"8a334ede-47b6-4eae-aeea-1e2bcc472f94\":{\"label\":\"Free\",\"dataType\":\"number\",\"operationType\":\"average\",\"sourceField\":\"system.memory.usage\",\"isBucketed\":false,\"scale\":\"ratio\",\"filter\":{\"query\":\"labels.state: \\\"free\\\" \",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":true,\"format\":{\"id\":\"bytes\",\"params\":{\"decimals\":2}}},\"customLabel\":true},\"3b9cf7ee-613d-4c9c-8a1b-5fca7fdc5dc7\":{\"label\":\"Used\",\"dataType\":\"number\",\"operationType\":\"average\",\"sourceField\":\"system.memory.usage\",\"isBucketed\":false,\"scale\":\"ratio\",\"filter\":{\"query\":\"labels.state: \\\"used\\\" \",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":true,\"format\":{\"id\":\"bytes\",\"params\":{\"decimals\":2}}},\"customLabel\":true},\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X0\":{\"label\":\"Part of average(system.memory.usage, kql='labels.state: \\\"used\\\"') + average(system.memory.usage, kql='labels.state: \\\"free\\\"')\",\"dataType\":\"number\",\"operationType\":\"average\",\"sourceField\":\"system.memory.usage\",\"isBucketed\":false,\"scale\":\"ratio\",\"filter\":{\"query\":\"labels.state: \\\"used\\\"\",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":false},\"customLabel\":true},\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X1\":{\"label\":\"Part of average(system.memory.usage, kql='labels.state: \\\"used\\\"') + average(system.memory.usage, kql='labels.state: \\\"free\\\"')\",\"dataType\":\"number\",\"operationType\":\"average\",\"sourceField\":\"system.memory.usage\",\"isBucketed\":false,\"scale\":\"ratio\",\"filter\":{\"query\":\"labels.state: \\\"free\\\"\",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":false},\"customLabel\":true},\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X2\":{\"label\":\"Part of average(system.memory.usage, kql='labels.state: \\\"used\\\"') + average(system.memory.usage, kql='labels.state: \\\"free\\\"')\",\"dataType\":\"number\",\"operationType\":\"math\",\"isBucketed\":false,\"scale\":\"ratio\",\"params\":{\"tinymathAst\":{\"type\":\"function\",\"name\":\"add\",\"args\":[\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X0\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X1\"],\"location\":{\"min\":0,\"max\":115},\"text\":\"average(system.memory.usage, kql='labels.state: \\\"used\\\"') + average(system.memory.usage, kql='labels.state: \\\"free\\\"')\"}},\"references\":[\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X0\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X1\"],\"customLabel\":true},\"282f5b98-13c4-41dd-bbf4-5a6f8928a857\":{\"label\":\"Total\",\"dataType\":\"number\",\"operationType\":\"formula\",\"isBucketed\":false,\"scale\":\"ratio\",\"params\":{\"formula\":\"average(system.memory.usage, kql='labels.state: \\\"used\\\"') + average(system.memory.usage, kql='labels.state: \\\"free\\\"')\",\"isFormulaBroken\":false,\"format\":{\"id\":\"bytes\",\"params\":{\"decimals\":2}}},\"references\":[\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X2\"],\"customLabel\":true}},\"columnOrder\":[\"719ac5fd-a2f0-4bf3-8dbc-c00357e96228\",\"8a334ede-47b6-4eae-aeea-1e2bcc472f94\",\"3b9cf7ee-613d-4c9c-8a1b-5fca7fdc5dc7\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X0\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X1\",\"282f5b98-13c4-41dd-bbf4-5a6f8928a857X2\"],\"incompleteColumns\":{},\"sampling\":1}}},\"indexpattern\":{\"layers\":{}},\"textBased\":{\"layers\":{}}},\"internalReferences\":[],\"adHocDataViews\":{}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"System Memory Usage\"},{\"version\":\"8.10.2\",\"type\":\"lens\",\"gridData\":{\"x\":24,\"y\":0,\"w\":24,\"h\":15,\"i\":\"9dcf1114-6984-4238-8229-cb9e802e0bdb\"},\"panelIndex\":\"9dcf1114-6984-4238-8229-cb9e802e0bdb\",\"embeddableConfig\":{\"attributes\":{\"title\":\"\",\"description\":\"\",\"visualizationType\":\"lnsXY\",\"type\":\"lens\",\"references\":[{\"type\":\"index-pattern\",\"id\":\"apm_static_index_pattern_id\",\"name\":\"indexpattern-datasource-layer-1633fa19-f9f3-4149-90c3-bffd1ba4e6c4\"}],\"state\":{\"visualization\":{\"legend\":{\"isVisible\":true,\"position\":\"bottom\"},\"valueLabels\":\"hide\",\"fittingFunction\":\"None\",\"axisTitlesVisibilitySettings\":{\"x\":false,\"yLeft\":true,\"yRight\":true},\"tickLabelsVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"labelsOrientation\":{\"x\":0,\"yLeft\":0,\"yRight\":0},\"gridlinesVisibilitySettings\":{\"x\":true,\"yLeft\":true,\"yRight\":true},\"preferredSeriesType\":\"bar_stacked\",\"layers\":[{\"layerId\":\"1633fa19-f9f3-4149-90c3-bffd1ba4e6c4\",\"accessors\":[\"74908758-6e28-43d5-929a-b4070c9026a1\",\"a49dd439-fc3c-4ebb-a2ca-46c7992cc29f\"],\"position\":\"top\",\"seriesType\":\"line\",\"showGridlines\":false,\"layerType\":\"data\",\"xAccessor\":\"24a38611-9513-4e32-bb79-2a723c11a513\"}],\"yTitle\":\"Utilization [%]\"},\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filters\":[],\"datasourceStates\":{\"formBased\":{\"layers\":{\"1633fa19-f9f3-4149-90c3-bffd1ba4e6c4\":{\"columns\":{\"24a38611-9513-4e32-bb79-2a723c11a513\":{\"label\":\"@timestamp\",\"dataType\":\"date\",\"operationType\":\"date_histogram\",\"sourceField\":\"@timestamp\",\"isBucketed\":true,\"scale\":\"interval\",\"params\":{\"interval\":\"auto\",\"includeEmptyRows\":true,\"dropPartials\":false}},\"74908758-6e28-43d5-929a-b4070c9026a1\":{\"label\":\"Average\",\"dataType\":\"number\",\"operationType\":\"average\",\"sourceField\":\"system.memory.utilization\",\"isBucketed\":false,\"scale\":\"ratio\",\"filter\":{\"query\":\"labels.state: \\\"used\\\" \",\"language\":\"kuery\"},\"params\":{\"emptyAsNull\":true,\"format\":{\"id\":\"percent\",\"params\":{\"decimals\":2}}},\"customLabel\":true},\"a49dd439-fc3c-4ebb-a2ca-46c7992cc29f\":{\"label\":\"Max\",\"dataType\":\"number\",\"operationType\":\"max\",\"sourceField\":\"system.memory.utilization\",\"isBucketed\":false,\"scale\":\"ratio\",\"params\":{\"emptyAsNull\":true,\"format\":{\"id\":\"percent\",\"params\":{\"decimals\":2}}},\"customLabel\":true,\"filter\":{\"query\":\"labels.state: \\\"used\\\" \",\"language\":\"kuery\"}}},\"columnOrder\":[\"24a38611-9513-4e32-bb79-2a723c11a513\",\"74908758-6e28-43d5-929a-b4070c9026a1\",\"a49dd439-fc3c-4ebb-a2ca-46c7992cc29f\"],\"incompleteColumns\":{},\"sampling\":1}}},\"textBased\":{\"layers\":{}}},\"internalReferences\":[],\"adHocDataViews\":{}}},\"hidePanelTitles\":false,\"enhancements\":{}},\"title\":\"System Memory Utilization\"}]","timeRestore":false,"title":"OpenTelemetry Memory Metrics","version":1},"coreMigrationVersion":"8.8.0","created_at":"2023-11-06T12:28:32.691Z","id":"fef77323-303f-4e39-a81f-553c268d16ec","managed":false,"references":[{"id":"metrics-*","name":"f3de253a-8c79-46d0-acb2-05eef8d056be:indexpattern-datasource-layer-ed2c0b0b-d8c5-415d-aec6-7681d578d3db","type":"index-pattern"},{"id":"apm_static_index_pattern_id","name":"9dcf1114-6984-4238-8229-cb9e802e0bdb:indexpattern-datasource-layer-1633fa19-f9f3-4149-90c3-bffd1ba4e6c4","type":"index-pattern"}],"type":"dashboard","typeMigrationVersion":"8.9.0","updated_at":"2023-11-06T12:28:32.691Z","version":"WzM4OSwyXQ=="}