Skip to content

Commit c034d76

Browse files
committed
Changed example to include paging.
1 parent 6519106 commit c034d76

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

examples/get_data_simple.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
# You just need to specify the ID for keys, and ID with aggregation for values.
3030
#
3131
metrics = [
32-
# { "id": "agent.tag.team" },
33-
# { "id": "kubernetes.pod.label.name" },
32+
# { "id": "container.id" },
3433
# { "id": "agent.tag.env", "aggregations": { "time": "concat", "group": "concat" } },
3534
{ "id": "cpu.used.percent", "aggregations": { "time": "timeAvg", "group": "avg" } }
3635
]
@@ -55,10 +54,15 @@
5554
#
5655
sampling = 60
5756

57+
#
58+
# Paging (from and to included; by default you get from=0 to=9)
59+
#
60+
paging = { "from": 0, "to": 4 }
61+
5862
#
5963
# Load data
6064
#
61-
res = sdclient.get_data(metrics, start, end, sampling, filter = filter)
65+
res = sdclient.get_data(metrics, start, end, sampling, filter = filter, paging = paging)
6266

6367
#
6468
# Show the result

0 commit comments

Comments
 (0)