Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"traceloop","colors":{"primary":"#EAB308","light":"#EAB308","dark":"#EAB308"},"favicon":"https://mintcdn.com/enrolla/-xQ9K52hAYrcQGvz/favicon.png?fit=max\u0026auto=format\u0026n=-xQ9K52hAYrcQGvz\u0026q=85\u0026s=6066426161fe311654d19ebca89ee7c0","logo":{"light":"https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/logo/traceloop-light.png?fit=max\u0026auto=format\u0026n=GspX1ocwd1gETLy0\u0026q=85\u0026s=e245f77b5b8af11ef9aa4a0ce2ee97a6","dark":"https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/logo/traceloop-dark.png?fit=max\u0026auto=format\u0026n=GspX1ocwd1gETLy0\u0026q=85\u0026s=d34d3b622526506a2a4512b32d4ebb9b"},"api":{"openapi":"openapi.json","mdx":{"server":"https://app.traceloop.com/api","auth":{"method":"bearer","name":null}}},"appearance":{"default":"dark","strict":null},"background":{"decoration":null,"color":{"light":null,"dark":"#09090B"}},"navbar":{"links":[{"label":"Community","href":"https://traceloop.com/slack"},{"label":"Support","href":"https://support.traceloop.com"}],"primary":{"type":"button","label":"Start now","href":"https://app.traceloop.com/"}},"footer":{"socials":{"github":"https://github.com/traceloop","twitter":"https://twitter.com/traceloopdev"}},"integrations":{"gtm":{"tagId":"GTM-NDQVZMH"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"enrolla","hasAudioNarration":false,"actualSubdomain":"enrolla","customDomains":["www.traceloop.com"],"gitSource":{"type":"github","owner":"traceloop","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a50ddc4a3ca9e4edbc90a63","collectionId":"adc0afa5-95ac-4624-90b0-9d9b79bb22a1","schemaVersion":"v3"},"feedback":{"thumbs":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6a50ddc4a3ca9e4edbc90a63:success","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Dashboard API","count":55},{"language":"default","tag":"OpenLLMetry","count":55},{"language":"default","tag":"Evaluators","count":43},{"language":"default","tag":"Integrations","count":34},{"language":"default","tag":"Documentation","count":30},{"language":"default","tag":"Tracing","count":14},{"language":"default","tag":"Quick Start","count":9},{"language":"default","tag":"Auto-monitor-setups","count":6},{"language":"default","tag":"Playgrounds","count":4},{"language":"default","tag":"Self-host","count":4}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#topbar-cta-button span,#topbar-cta-button svg{color:#09090b!important}#topbar-cta-button span.absolute{border-radius:8px!important}.nav-logo{width:140px!important}"}],"page":{"pagePath":"api-reference/metrics/get-metrics-with-filtering-and-grouping","slug":"/api-reference/metrics/get-metrics-with-filtering-and-grouping","pageMetadata":{"openapi":"post /v2/metrics","title":"Get metrics with filtering and grouping","description":"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).","href":"/api-reference/metrics/get-metrics-with-filtering-and-grouping"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"post /v2/metrics","title":"Get metrics with filtering and grouping","description":"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).","href":"/api-reference/metrics/get-metrics-with-filtering-and-grouping"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/enrolla/99d79fc3a15df79c/vibekit.js","/docs/_mintlify/custom/enrolla/a052f9c2fb91f2bb/scripts/filter-openapi.js","/docs/_mintlify/custom/enrolla/f023a04dbd14c606/scripts/update-mint-navigation.js"],"openApiReferenceData":{"operation":{"description":"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).","operationId":"get-metrics","requestBody":"1667cb4b-afb7-42d5-ba80-89a3fba17705","responses":{"200":"561b4f48-c7b3-4c3e-a516-31a6c4c3101a","400":"30097709-b6f2-4d33-9a1f-7e45e7888254","404":"67dfcdd9-aa0e-4e95-a741-aa30fe2f41c8","500":"d25e1229-9d35-4342-bbbd-abc18ba5a9c3"},"summary":"Get metrics with filtering and grouping","tags":["metrics"],"method":"post","type":"path","servers":["381ed89e-4ddc-453c-9ccd-5725cffdc537"],"security":[],"path":"/v2/metrics","baseUrlOptions":["https://api.traceloop.com"],"title":"Get metrics with filtering and grouping","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"from_timestamp_sec":{"type":"integer","description":"Start time in Unix seconds timestamp.","example":1772905218,"uniqueKey":"from_timestamp_sec","typeLabel":"integer"},"to_timestamp_sec":{"type":"integer","description":"End time in Unix seconds timestamp.","example":1772905218,"uniqueKey":"to_timestamp_sec","typeLabel":"integer"},"cursor":{"type":"integer","description":"Pagination cursor for fetching the next page of results. The cursor is returned in the response to the previous request.","example":1772905218000,"uniqueKey":"cursor","typeLabel":"integer"},"environments":{"items":{"type":"string","uniqueKey":"environments.items.[INDEX]","typeLabel":"string"},"type":"array","description":"List of environments to filter by","example":["prd","stg","dev"],"uniqueKey":"environments","typeLabel":"string[]"},"filters":{"items":{"properties":{"field":{"type":"string","description":"Field key to filter by. The key is labels attribute on the metric point from the response.metrics object","example":"labels.agent_name","uniqueKey":"filters.items.[INDEX].field","typeLabel":"string"},"operator":{"type":"string","description":"Comparison operator.","enum":["equals","not_equals","contains","not_contains","in","not_in"],"example":"equals","uniqueKey":"filters.items.[INDEX].operator","typeLabel":"enum\u003cstring>"},"value":{"type":"string","description":"Value to filter by.","example":"Travel Planner Agent","uniqueKey":"filters.items.[INDEX].value","typeLabel":"string"},"values":{"items":{"type":"string","uniqueKey":"filters.items.[INDEX].values.items.[INDEX]","typeLabel":"string"},"type":"array","description":"List of values to filter by. This is only used for the in and not_in operators.","example":["Travel Planner Agent","Calendar Planner Agent"],"uniqueKey":"filters.items.[INDEX].values","typeLabel":"string[]"}},"type":"object","uniqueKey":"filters.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"filters","typeLabel":"object[]"},"limit":{"type":"integer","description":"Maximum number of metrics to return per page.","example":50,"uniqueKey":"limit","typeLabel":"integer"},"logical_operator":{"enum":["AND","OR"],"type":"string","x-enum-varnames":["LogicalOperatorAnd","LogicalOperatorOr"],"uniqueKey":"logical_operator","typeLabel":"enum\u003cstring>"},"metric_name":{"type":"string","description":"Metric name to filter by. The metric_name is a metric attribute that is set on the metric object.","example":"answer relevancy","uniqueKey":"metric_name","typeLabel":"string"},"metric_source":{"type":"string","description":"Metric source to filter by. The metric_source is a metric attribute that is set on the metric object.","example":"llm_as_a_judge","uniqueKey":"metric_source","typeLabel":"string"},"sort_by":{"type":"string","description":"Field to sort by.","example":"timestamp","uniqueKey":"sort_by","typeLabel":"string"},"sort_order":{"type":"string","description":"Sort order.","example":"ASC","uniqueKey":"sort_order","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"from_timestamp_sec":1772905218,"to_timestamp_sec":1772905218,"cursor":1772905218000,"environments":["prd","stg","dev"],"filters":[{"field":"labels.agent_name","operator":"equals","value":"Travel Planner Agent","values":["Travel Planner Agent","Calendar Planner Agent"]}],"limit":50,"metric_name":"answer relevancy","metric_source":"llm_as_a_judge","sort_by":"timestamp","sort_order":"ASC"}}},"exampleType":"generated"}},"description":"Metrics query parameters including filters, environments, and pagination","required":true,"exampleType":"generated"},"responses":{"561b4f48-c7b3-4c3e-a516-31a6c4c3101a":{"description":"Grouped metrics with data points","content":{"application/json":{"schema":{"properties":{"metrics":{"properties":{"data":{"items":{"properties":{"metric_name":{"type":"string","description":"Metric name.","example":"answer relevancy","uniqueKey":"metrics.data.items.[INDEX].metric_name","typeLabel":"string"},"organization_id":{"type":"string","uniqueKey":"metrics.data.items.[INDEX].organization_id","typeLabel":"string"},"points":{"items":{"description":"A single metric data point. The `unit` field in `labels` indicates the data type and determines which value field is populated: `bool_value` for booleans unitless, `numeric_value` for number units, or `enum_value` for strings.","properties":{"bool_value":{"type":"boolean","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX].bool_value","typeLabel":"boolean"},"enum_value":{"type":"string","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX].enum_value","typeLabel":"string"},"numeric_value":{"type":"number","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX].numeric_value","typeLabel":"number"},"event_time":{"type":"integer","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX].event_time","typeLabel":"integer"},"labels":{"description":"The labels are the attributes of the metric point. The labels are key-value pairs that are used to identify the metric point.","example":{"agent_name":"Travel Planner Agent","entity_type":"span","env_project_id":"1111","environment":"dev","evaluator_name":"","insert_time":"1772616490000","metric_source":"word_count","metric_type":"numeric","model":"gpt-4o-2024-08-06","org_id":"12345","run_id":"54321","service_name":"travel-agent-demo","span_id":"e118a1985c9cff23","trace_id":"2c98a42d1225cb786f3395d97ca3014d","unit":"words","vendor":"openai"},"additionalProperties":{"type":"string","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX].labels.additionalProperties","typeLabel":"string"},"type":"object","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX].labels","typeLabel":"object"}},"type":"object","uniqueKey":"metrics.data.items.[INDEX].points.items.[INDEX]","typeLabel":"object"},"type":"array","description":"List of data points for this metric. The `unit` field in each point's `labels` indicates the data type and determines which value field is populated: `bool_value` for booleans, `numeric_value` for numbers, or `enum_value` for strings.","uniqueKey":"metrics.data.items.[INDEX].points","typeLabel":"object[]"}},"type":"object","uniqueKey":"metrics.data.items.[INDEX]","typeLabel":"object"},"type":"array","uniqueKey":"metrics.data","typeLabel":"object[]"},"next_cursor":{"type":"string","uniqueKey":"metrics.next_cursor","typeLabel":"string"},"total_points":{"type":"integer","uniqueKey":"metrics.total_points","typeLabel":"integer"},"total_results":{"type":"integer","uniqueKey":"metrics.total_results","typeLabel":"integer"}},"type":"object","uniqueKey":"metrics","typeLabel":"object"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"metrics":{"data":[{"metric_name":"answer relevancy","organization_id":"\u003cstring>","points":[{"bool_value":true,"enum_value":"\u003cstring>","numeric_value":123,"event_time":123,"labels":{"agent_name":"Travel Planner Agent","entity_type":"span","env_project_id":"1111","environment":"dev","evaluator_name":"","insert_time":"1772616490000","metric_source":"word_count","metric_type":"numeric","model":"gpt-4o-2024-08-06","org_id":"12345","run_id":"54321","service_name":"travel-agent-demo","span_id":"e118a1985c9cff23","trace_id":"2c98a42d1225cb786f3395d97ca3014d","unit":"words","vendor":"openai"}}]}],"next_cursor":"\u003cstring>","total_points":123,"total_results":123}}}},"exampleType":"generated"}},"exampleType":"generated"},"30097709-b6f2-4d33-9a1f-7e45e7888254":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"description":"Standard error response structure","properties":{"error":{"example":"error message","type":"string","uniqueKey":"error","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"error message"}}},"exampleType":"generated"}},"exampleType":"generated"},"67dfcdd9-aa0e-4e95-a741-aa30fe2f41c8":{"description":"Not Found","content":{"application/json":{"schema":{"description":"Standard error response structure","properties":{"error":{"example":"error message","type":"string","uniqueKey":"error","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"error message"}}},"exampleType":"generated"}},"exampleType":"generated"},"d25e1229-9d35-4342-bbbd-abc18ba5a9c3":{"description":"Internal server error","content":{"application/json":{"schema":{"description":"Standard error response structure","properties":{"error":{"example":"error message","type":"string","uniqueKey":"error","typeLabel":"string"}},"type":"object","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"error message"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1ad0deb4-c6a7-41b0-a1e0-7bcb591c449f":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}}},"servers":{"381ed89e-4ddc-453c-9ccd-5725cffdc537":{"url":"https://api.traceloop.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"Authorization","name":"Authorization"}],"title":"Authorization"}]},"originalFileLocation":"openapi.json"},"subdomain":"enrolla","siteName":"traceloop","title":"Get metrics with filtering and grouping - traceloop","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-25T08:51:17.259Z","originalFileLocation":"api-reference/metrics/get-metrics-with-filtering-and-grouping.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).\">\u003cmeta data-mint-head name=\"application-name\" content=\"traceloop\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get metrics with filtering and grouping - traceloop\">\u003cmeta data-mint-head property=\"og:description\" content=\"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"traceloop\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://enrolla.mintlify.app/_mintlify/api/og/v2?division=Metrics\u0026amp;title=Get+metrics+with+filtering+and+grouping\u0026amp;description=Retrieves+metrics+data+with+support+for+filtering%2C+sorting%2C+and+pagination.+Metrics+are+grouped+by+metric+name+with+individual+data+points.+Supports+filtering+b\u0026amp;theme=ff62921debafe09ea1aaaffe\u0026amp;signature=28a5f3c55af39b6c4a5668fbaf3df9883d127c228e66b03bd65e74481781ab78\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Get metrics with filtering and grouping - traceloop\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://enrolla.mintlify.app/_mintlify/api/og/v2?division=Metrics\u0026amp;title=Get+metrics+with+filtering+and+grouping\u0026amp;description=Retrieves+metrics+data+with+support+for+filtering%2C+sorting%2C+and+pagination.+Metrics+are+grouped+by+metric+name+with+individual+data+points.+Supports+filtering+b\u0026amp;theme=ff62921debafe09ea1aaaffe\u0026amp;signature=28a5f3c55af39b6c4a5668fbaf3df9883d127c228e66b03bd65e74481781ab78\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/enrolla/c4jFPLhIQoqlp6LG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"traceloop\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EAB308\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.traceloop.com/#organization\",\"name\":\"traceloop\",\"url\":\"https://www.traceloop.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/enrolla/GspX1ocwd1gETLy0/logo/traceloop-light.png?fit=max\u0026auto=format\u0026n=GspX1ocwd1gETLy0\u0026q=85\u0026s=e245f77b5b8af11ef9aa4a0ce2ee97a6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.traceloop.com/docs#website\",\"name\":\"traceloop\",\"url\":\"https://www.traceloop.com/docs\",\"publisher\":{\"@id\":\"https://www.traceloop.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping#webpage\",\"url\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping\",\"name\":\"Get metrics with filtering and grouping\",\"description\":\"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).\",\"dateModified\":\"2026-01-25T08:51:17.259Z\",\"isPartOf\":{\"@id\":\"https://www.traceloop.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Metrics\",\"item\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-high-water-mark\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get metrics with filtering and grouping\",\"item\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping#apireference\",\"headline\":\"Get metrics with filtering and grouping\",\"name\":\"Get metrics with filtering and grouping\",\"description\":\"Retrieves metrics data with support for filtering, sorting, and pagination. Metrics are grouped by metric name with individual data points. Supports filtering by direct column fields (bool_value, trace_id, etc.), label fields (labels.agent_name, labels.trace_id), and attribute fields (attributes.*).\",\"url\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping\",\"mainEntityOfPage\":{\"@id\":\"https://www.traceloop.com/docs/api-reference/metrics/get-metrics-with-filtering-and-grouping#webpage\"},\"dateModified\":\"2026-01-25T08:51:17.259Z\",\"publisher\":{\"@id\":\"https://www.traceloop.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.traceloop.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"traceloop\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"traceloop","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/introduction"}]},{"anchor":"OpenLLMetry","icon":"telescope","pages":[{"title":"OpenLLMetry","href":"/openllmetry/introduction"}]},{"anchor":"Hub","icon":"arrows-to-dot","pages":[{"title":"Hub","href":"/hub/getting-started"}]},{"anchor":"Dashboard API","icon":"webhook","groups":[{"group":"API Reference","pages":[{"title":"Introduction","href":"/api-reference/introduction"}]},{"group":"Tracing","pages":[{"title":"Enable logging of prompts and responses","api":"POST https://app.traceloop.com/api/config/pii/tracing-allow-list","href":"/api-reference/tracing/whitelist_user"},{"title":"Get identifiers of users that are allowed to be logged","api":"GET https://app.traceloop.com/api/config/pii/tracing-allow-list","href":"/api-reference/tracing/get_whitelisted_users"},{"title":"Disable logging of prompts and responses for specific users","api":"DELETE https://app.traceloop.com/api/config/pii/tracing-allow-list","href":"/api-reference/tracing/delete_whitelisted_user"}]},{"group":"GDPR \u0026 Privacy","pages":[{"title":"Delete specific user data","api":"DELETE https://app.traceloop.com/api/config/privacy/data-deletion","href":"/api-reference/privacy/delete_request"},{"title":"Status of user deletion request","api":"GET https://app.traceloop.com/api/config/privacy/data-deletion","href":"/api-reference/privacy/delete_status"}]},{"group":"Costs","pages":[{"title":"Get costs by property","api":"GET https://api.traceloop.com/v2/costs/by-association-property","href":"/api-reference/costs/property_costs"}]},{"group":"Warehouse","pages":[{"title":"Get Spans","api":"GET https://api.traceloop.com/v2/warehouse/spans","href":"/api-reference/warehouse/get_spans"}]},{"group":"Organizations","pages":[{"openapi":"post /v2/organizations","title":"Create a new organization","href":"/api-reference/organizations/create-a-new-organization"}]},{"group":"Evaluators","pages":[{"openapi":"post /v2/evaluators","title":"Create a custom LLM-as-a-judge evaluator","href":"/api-reference/evaluators/create-a-custom-llm-as-a-judge-evaluator"},{"openapi":"post /v2/evaluators/action-advancement/execute","title":"Execute action-advancement evaluator","href":"/api-reference/evaluators/execute-action-advancement-evaluator"},{"openapi":"post /v2/evaluators/agent-efficiency/execute","title":"Execute agent-efficiency evaluator","href":"/api-reference/evaluators/execute-agent-efficiency-evaluator"},{"openapi":"post /v2/evaluators/agent-flow-quality/execute","title":"Execute agent-flow-quality evaluator","href":"/api-reference/evaluators/execute-agent-flow-quality-evaluator"},{"openapi":"post /v2/evaluators/agent-goal-accuracy/execute","title":"Execute agent-goal-accuracy evaluator","href":"/api-reference/evaluators/execute-agent-goal-accuracy-evaluator"},{"openapi":"post /v2/evaluators/agent-goal-completeness/execute","title":"Execute agent-goal-completeness evaluator","href":"/api-reference/evaluators/execute-agent-goal-completeness-evaluator"},{"openapi":"post /v2/evaluators/agent-tool-error-detector/execute","title":"Execute agent-tool-error-detector evaluator","href":"/api-reference/evaluators/execute-agent-tool-error-detector-evaluator"},{"openapi":"post /v2/evaluators/agent-tool-selection-quality/execute","title":"Execute agent-tool-selection-quality evaluator","href":"/api-reference/evaluators/execute-agent-tool-selection-quality-evaluator"},{"openapi":"post /v2/evaluators/agent-tool-trajectory/execute","title":"Execute agent-tool-trajectory evaluator","href":"/api-reference/evaluators/execute-agent-tool-trajectory-evaluator"},{"openapi":"post /v2/evaluators/answer-completeness/execute","title":"Execute answer-completeness evaluator","href":"/api-reference/evaluators/execute-answer-completeness-evaluator"},{"openapi":"post /v2/evaluators/answer-correctness/execute","title":"Execute answer-correctness evaluator","href":"/api-reference/evaluators/execute-answer-correctness-evaluator"},{"openapi":"post /v2/evaluators/answer-relevancy/execute","title":"Execute answer-relevancy evaluator","href":"/api-reference/evaluators/execute-answer-relevancy-evaluator"},{"openapi":"post /v2/evaluators/char-count/execute","title":"Execute char-count evaluator","href":"/api-reference/evaluators/execute-char-count-evaluator"},{"openapi":"post /v2/evaluators/char-count-ratio/execute","title":"Execute char-count-ratio evaluator","href":"/api-reference/evaluators/execute-char-count-ratio-evaluator"},{"openapi":"post /v2/evaluators/context-relevance/execute","title":"Execute context-relevance evaluator","href":"/api-reference/evaluators/execute-context-relevance-evaluator"},{"openapi":"post /v2/evaluators/conversation-quality/execute","title":"Execute conversation-quality evaluator","href":"/api-reference/evaluators/execute-conversation-quality-evaluator"},{"openapi":"post /v2/evaluators/faithfulness/execute","title":"Execute faithfulness evaluator","href":"/api-reference/evaluators/execute-faithfulness-evaluator"},{"openapi":"post /v2/evaluators/html-comparison/execute","title":"Execute html-comparison evaluator","href":"/api-reference/evaluators/execute-html-comparison-evaluator"},{"openapi":"post /v2/evaluators/instruction-adherence/execute","title":"Execute instruction-adherence evaluator","href":"/api-reference/evaluators/execute-instruction-adherence-evaluator"},{"openapi":"post /v2/evaluators/intent-change/execute","title":"Execute intent-change evaluator","href":"/api-reference/evaluators/execute-intent-change-evaluator"},{"openapi":"post /v2/evaluators/json-validator/execute","title":"Execute json-validator evaluator","href":"/api-reference/evaluators/execute-json-validator-evaluator"},{"openapi":"post /v2/evaluators/perplexity/execute","title":"Execute perplexity evaluator","href":"/api-reference/evaluators/execute-perplexity-evaluator"},{"openapi":"post /v2/evaluators/pii-detector/execute","title":"Execute pii-detector evaluator","href":"/api-reference/evaluators/execute-pii-detector-evaluator"},{"openapi":"post /v2/evaluators/placeholder-regex/execute","title":"Execute placeholder-regex evaluator","href":"/api-reference/evaluators/execute-placeholder-regex-evaluator"},{"openapi":"post /v2/evaluators/profanity-detector/execute","title":"Execute profanity-detector evaluator","href":"/api-reference/evaluators/execute-profanity-detector-evaluator"},{"openapi":"post /v2/evaluators/prompt-injection/execute","title":"Execute prompt-injection evaluator","href":"/api-reference/evaluators/execute-prompt-injection-evaluator"},{"openapi":"post /v2/evaluators/prompt-perplexity/execute","title":"Execute prompt-perplexity evaluator","href":"/api-reference/evaluators/execute-prompt-perplexity-evaluator"},{"openapi":"post /v2/evaluators/regex-validator/execute","title":"Execute regex-validator evaluator","href":"/api-reference/evaluators/execute-regex-validator-evaluator"},{"openapi":"post /v2/evaluators/secrets-detector/execute","title":"Execute secrets-detector evaluator","href":"/api-reference/evaluators/execute-secrets-detector-evaluator"},{"openapi":"post /v2/evaluators/semantic-similarity/execute","title":"Execute semantic-similarity evaluator","href":"/api-reference/evaluators/execute-semantic-similarity-evaluator"},{"openapi":"post /v2/evaluators/sexism-detector/execute","title":"Execute sexism-detector evaluator","href":"/api-reference/evaluators/execute-sexism-detector-evaluator"},{"openapi":"post /v2/evaluators/sql-validator/execute","title":"Execute sql-validator evaluator","href":"/api-reference/evaluators/execute-sql-validator-evaluator"},{"openapi":"post /v2/evaluators/tone-detection/execute","title":"Execute tone-detection evaluator","href":"/api-reference/evaluators/execute-tone-detection-evaluator"},{"openapi":"post /v2/evaluators/topic-adherence/execute","title":"Execute topic-adherence evaluator","href":"/api-reference/evaluators/execute-topic-adherence-evaluator"},{"openapi":"post /v2/evaluators/toxicity-detector/execute","title":"Execute toxicity-detector evaluator","href":"/api-reference/evaluators/execute-toxicity-detector-evaluator"},{"openapi":"post /v2/evaluators/uncertainty-detector/execute","title":"Execute uncertainty-detector evaluator","href":"/api-reference/evaluators/execute-uncertainty-detector-evaluator"},{"openapi":"post /v2/evaluators/word-count/execute","title":"Execute word-count evaluator","href":"/api-reference/evaluators/execute-word-count-evaluator"},{"openapi":"post /v2/evaluators/word-count-ratio/execute","title":"Execute word-count-ratio evaluator","href":"/api-reference/evaluators/execute-word-count-ratio-evaluator"}]},{"group":"Metrics","pages":[{"openapi":"get /v2/metrics_hwm","title":"Get metrics high water mark","description":"Returns the timestamp of the last successfully processed evaluation (high water mark)","href":"/api-reference/metrics/get-metrics-high-water-mark"},{"openapi":"post /v2/metrics","title":"Get metrics with filtering and grouping","href":"/api-reference/metrics/get-metrics-with-filtering-and-grouping"}]},{"group":"Auto-monitor-setups","pages":[{"title":"Create an Auto Monitor Setup","description":"Trigger a process that attempts to create a Traceloop monitor using the provided selector criteria","api":"POST /v2/auto-monitor-setups","href":"/api-reference/auto-monitor-setups/create-an-auto-monitor-setup"},{"title":"Bulk Upsert Auto Monitor Setups","api":"POST /v2/auto-monitor-setups/bulk","href":"/api-reference/auto-monitor-setups/bulk-upsert-auto-monitor-setups"},{"openapi":"delete /v2/auto-monitor-setups/{external_id}","title":"Delete an auto monitor setup by external ID","href":"/api-reference/auto-monitor-setups/delete-an-auto-monitor-setup-by-external-id"},{"openapi":"get /v2/auto-monitor-setups/{external_id}","title":"Get an auto monitor setup by external ID","href":"/api-reference/auto-monitor-setups/get-an-auto-monitor-setup-by-external-id"},{"openapi":"get /v2/auto-monitor-setups","title":"List auto monitor setups","href":"/api-reference/auto-monitor-setups/list-auto-monitor-setups"},{"openapi":"put /v2/auto-monitor-setups/{external_id}","title":"Update an auto monitor setup by external ID","href":"/api-reference/auto-monitor-setups/update-an-auto-monitor-setup-by-external-id"}]}]},{"anchor":"Community","href":"https://traceloop.com/slack","icon":"slack"},{"anchor":"GitHub","href":"https://github.com/traceloop","icon":"github"}]},"title":"Get metrics with filtering and grouping - traceloop","buildId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","deploymentId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-D2GYGXhJ.js","utils-BFd71lo2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-i162M7Za.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-oUw0la6W.js","snippetPresets-DtIWL37f.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BCMBbEQM.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DC4RgS91.js","shallow-CgVeLRFv.js","getApiPlaygroundDisplay-D5biMY5x.js","CodeSnippet-BFsbT-Fu.js","CodeSnippets-zLLOIece.js","Page-Ddn8iQDL.js","getPastedJson-BrHW4jRt.js","icon-CkMCp-Tk.js","MethodPill-CCcSM-Ep.js","DuplicateIcon-4tBrFI-V.js","createIcon-YbZxtfvX.js","DynamicMarkdown-BQC1aHST.js","SectionHeading-Dyh8yRs0.js","axios-vUo_bRtp.js","Markdown-DnRxVfNy.js","clsx-BHwt7gjg.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CI1QhstW.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Ctpizp2W.js"]}