Dhruv B
08/27/2025, 4:26 AMActiveCallCount, err = meter.Int64UpDownCounter(
"calls.active",
metric.WithDescription("Number of currently active calls"),
)
And when a call is started I add 1 to the counter and when it ends I add -1 to the counter.
Overall seems simple -- when I try to add this metric to my dashboard, I get very strange values. No matter what I put for the aggregator -- the values are very off... I am expecting a value near zero.Srikanth Chekuri
08/27/2025, 4:34 AMDhruv B
08/27/2025, 4:36 AMSrikanth Chekuri
08/27/2025, 4:37 AMDhruv B
08/27/2025, 4:38 AMSrikanth Chekuri
08/27/2025, 4:40 AMDhruv B
08/27/2025, 4:43 AMPOST /query_range
gives the following response
{
"status": "success",
"data": {
"type": "scalar",
"meta": {
"rowsScanned": 247792,
"bytesScanned": 2712994,
"durationMs": 91
},
"data": {
"results": [
{
"queryName": "A",
"columns": [
{
"name": "__result_0",
"signal": "",
"fieldContext": "",
"fieldDataType": "",
"queryName": "A",
"aggregationIndex": 0,
"meta": {},
"columnType": "aggregation"
}
],
"data": [
[
-1276
]
]
}
]
}
}
}
Srikanth Chekuri
08/27/2025, 4:44 AM-1276
now? Can you please share the request payload?Dhruv B
08/27/2025, 4:44 AMDhruv B
08/27/2025, 4:45 AM{
"schemaVersion": "v1",
"start": 1755664954000,
"end": 1756269754000,
"requestType": "scalar",
"compositeQuery": {
"queries": [
{
"type": "builder_query",
"spec": {
"name": "A",
"signal": "metrics",
"source": "",
"stepInterval": 200,
"disabled": false,
"filter": {
"expression": "env.type = 'production'"
},
"having": {
"expression": ""
},
"aggregations": [
{
"metricName": "calls.active",
"timeAggregation": "latest",
"spaceAggregation": "avg",
"reduceTo": "sum"
}
]
}
}
]
},
"formatOptions": {
"formatTableResultForUI": false,
"fillGaps": false
},
"variables": {}
}
Srikanth Chekuri
08/27/2025, 4:47 AMSrikanth Chekuri
08/27/2025, 4:48 AMDhruv B
08/27/2025, 4:48 AMDhruv B
08/27/2025, 4:49 AMDhruv B
08/27/2025, 4:49 AMDhruv B
08/27/2025, 4:49 AMDhruv B
08/27/2025, 4:50 AMDhruv B
08/27/2025, 4:50 AMSrikanth Chekuri
08/27/2025, 4:51 AMDhruv B
08/27/2025, 4:52 AM{
"schemaVersion": "v1",
"start": 1755665416000,
"end": 1756270216000,
"requestType": "scalar",
"compositeQuery": {
"queries": [
{
"type": "builder_query",
"spec": {
"name": "A",
"signal": "metrics",
"source": "",
"stepInterval": 1980,
"disabled": false,
"filter": {
"expression": "env.type = 'production'"
},
"having": {
"expression": ""
},
"aggregations": [
{
"metricName": "calls.active",
"timeAggregation": "latest",
"spaceAggregation": "avg",
"reduceTo": "last"
}
]
}
}
]
},
"formatOptions": {
"formatTableResultForUI": false,
"fillGaps": false
},
"variables": {}
}
{
"status": "success",
"data": {
"type": "scalar",
"meta": {
"rowsScanned": 848969,
"bytesScanned": 35198242,
"durationMs": 1235
},
"data": {
"results": [
{
"queryName": "A",
"columns": [
{
"name": "__result_0",
"signal": "",
"fieldContext": "",
"fieldDataType": "",
"queryName": "A",
"aggregationIndex": 0,
"meta": {},
"columnType": "aggregation"
}
],
"data": [
[
-1
]
]
}
]
}
}
}
Srikanth Chekuri
08/27/2025, 4:54 AMDhruv B
08/27/2025, 4:56 AMDhruv B
08/27/2025, 4:56 AMSrikanth Chekuri
08/27/2025, 4:58 AMSrikanth Chekuri
08/27/2025, 4:59 AMDhruv B
08/27/2025, 5:03 AMDhruv B
08/27/2025, 5:04 AMSigNoz is an open-source APM. It helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc.
Powered by