diff --git a/test/config/good.yml b/test/config/good.yml index 89cccf90..9bde7320 100644 --- a/test/config/good.yml +++ b/test/config/good.yml @@ -5,6 +5,7 @@ modules: - name: example_global_value path: "{ .counter }" help: Example of a top-level global value scrape in the json + valuetype: gauge labels: environment: beta # static label location: "planet-{.location}" # dynamic label @@ -13,6 +14,7 @@ modules: type: object help: Example of sub-level value scrapes from a json path: '{.values[?(@.state == "ACTIVE")]}' + valuetype: counter labels: environment: beta # static label id: '{.id}' # dynamic label diff --git a/test/response/good.txt b/test/response/good.txt index dc7538f8..d9b1ca1e 100644 --- a/test/response/good.txt +++ b/test/response/good.txt @@ -1,15 +1,15 @@ # HELP example_global_value Example of a top-level global value scrape in the json -# TYPE example_global_value untyped +# TYPE example_global_value gauge example_global_value{environment="beta",location="planet-mars"} 1234 # HELP example_value_active Example of sub-level value scrapes from a json -# TYPE example_value_active untyped +# TYPE example_value_active counter example_value_active{environment="beta",id="id-A"} 1 example_value_active{environment="beta",id="id-C"} 1 # HELP example_value_boolean Example of sub-level value scrapes from a json -# TYPE example_value_boolean untyped +# TYPE example_value_boolean counter example_value_boolean{environment="beta",id="id-A"} 1 example_value_boolean{environment="beta",id="id-C"} 0 # HELP example_value_count Example of sub-level value scrapes from a json -# TYPE example_value_count untyped +# TYPE example_value_count counter example_value_count{environment="beta",id="id-A"} 1 example_value_count{environment="beta",id="id-C"} 3