Update a log-based metric

PATCH {{baseUrl}}/api/v2/logs/config/metrics/:metric_id

Update a specific log-based metric from your organization. Returns the log-based metric object from the request body when the request is successful.

Request Body

{"data"=>{"type"=>"logs_metrics", "attributes"=>{"compute"=>{"include_percentiles"=>true}, "filter"=>{"query"=>"service:web* AND @http.status_code:[200 TO 299]"}, "group_by"=>[{"path"=>"@http.status_code", "tag_name"=>"status_code"}, {"path"=>"@http.status_code", "tag_name"=>"status_code"}]}}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{"data":{"attributes":{"compute":{"aggregation_type":"distribution","include_percentiles":true,"path":"@duration"},"filter":{"query":"service:web* AND @http.status_code:[200 TO 299]"},"group_by":[{"path":"@http.status_code","tag_name":"status_code"},{"path":"@http.status_code","tag_name":"status_code"}]},"id":"logs.page.load.count","type":"logs_metrics"}}