Skip to content

Commit

Permalink
add metrics attributes to metrics.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
cboudereau committed Feb 27, 2024
1 parent 3e920d6 commit c8f8ef8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions _DRAFT/OTEL-example/metrics.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /bin/sh
curl -X POST -H 'Content-Type: application/json' -i localhost:4318/v1/metrics \
curl -v -X POST -H 'Content-Type: application/json' http://localhost:4318/v1/metrics \
-d "{
\"resourceMetrics\": [{
\"resource\": {
Expand All @@ -8,6 +8,12 @@ curl -X POST -H 'Content-Type: application/json' -i localhost:4318/v1/metrics \
\"value\": {
\"stringValue\": \"hello-world\"
}
},
{
\"key\": \"hello\",
\"value\": {
\"stringValue\": \"world\"
}
}],
\"droppedAttributesCount\": 0
},
Expand All @@ -19,7 +25,12 @@ curl -X POST -H 'Content-Type: application/json' -i localhost:4318/v1/metrics \
\"aggregationTemporality\": 2,
\"dataPoints\": [{
\"asDouble\": 1,
\"attributes\": [],
\"attributes\": [{
\"key\": \"hello-dp\",
\"value\": {
\"stringValue\": \"world\"
}
}],
\"startTimeUnixNano\": $(date +%s%N),
\"timeUnixNano\": $(date +%s%N)
}],
Expand Down

0 comments on commit c8f8ef8

Please sign in to comment.