Skip to content

Commit

Permalink
prometheus custom labels (#278)
Browse files Browse the repository at this point in the history
* feat(metrics): allow passing custom labels to prometheus

* chore(package): upgrade mocha version

* chore(package): update artillery version and package-lock
  • Loading branch information
enudler authored Apr 6, 2020
1 parent 626aa58 commit 8e3441f
Show file tree
Hide file tree
Showing 8 changed files with 657 additions and 387 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
docker_layer_caching: false
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
# - run: npm audit
- run: npm audit --only=prod --audit-level=moderate
- run: npm run lint
- run: npm run unit-tests
- store_artifacts:
Expand Down
9 changes: 5 additions & 4 deletions docs/devguide/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ Additional parameters for the following chosen databases:
| METRICS_PLUGIN_NAME | metrics_plugin_name | Metrics integration to use [prometheus,influx] || |

#### Prometheus
| Environment Variable | Configuration key | Description | Configurable from UI/API | Default value |
|---------------------- |------------------------------------- |-------------------------------------- |-------------------------- |--------------- |
| | prometheus_metrics.push_gateway_url | Url of push gateway || |
| | prometheus_metrics.buckets_sizes | Bucket sizes to configure prometheus || |
| Environment Variable | Configuration key | Description | Configurable from UI/API | Default value |
|---------------------- |------------------------------------- |---------------------------------------------------|-------------------------- |--------------- |
| | prometheus_metrics.push_gateway_url | Url of push gateway || |
| | prometheus_metrics.buckets_sizes | Bucket sizes to configure prometheus || |
| | prometheus_metrics.labels | Labels will be passed to the push gateway || |

#### Influx
| Environment Variable | Configuration key | Description | Configurable from UI/API | Default value |
Expand Down
13 changes: 9 additions & 4 deletions docs/devguide/docs/swagger-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1865,6 +1865,11 @@ components:
buckets_sizes:
type: string
description: Bucket sizes use to configure prometheus.
labels:
description: Labels which will be passed to prometheus push gateway.
type: object
additionalProperties:
type: string
smtp_server:
additionalProperties: false
type: object
Expand Down Expand Up @@ -1922,15 +1927,15 @@ components:
- $ref: '#/components/schemas/benchmark_weights'
server_errors:
description: 5xx server errors benchmark weight
allOf:
allOf:
- $ref: '#/components/schemas/benchmark_weights'
client_errors:
description: 4xx server errors benchmark weight
allOf:
allOf:
- $ref: '#/components/schemas/benchmark_weights'
rps:
description: requests per second benchmark weight
allOf:
allOf:
- $ref: '#/components/schemas/benchmark_weights'
benchmark_weights:
type: object
Expand All @@ -1943,4 +1948,4 @@ components:
description: benchmark factor weight
percentage:
type: number
description: benchmark percentage weight
description: benchmark percentage weight
13 changes: 9 additions & 4 deletions docs/openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,11 @@ components:
buckets_sizes:
type: string
description: Bucket sizes use to configure prometheus.
labels:
description: Labels which will be passed to prometheus push gateway.
type: object
additionalProperties:
type: string
smtp_server:
additionalProperties: false
type: object
Expand Down Expand Up @@ -2203,15 +2208,15 @@ components:
- $ref: '#/components/schemas/benchmark_weights'
server_errors:
description: 5xx server errors benchmark weight
allOf:
allOf:
- $ref: '#/components/schemas/benchmark_weights'
client_errors:
description: 4xx server errors benchmark weight
allOf:
allOf:
- $ref: '#/components/schemas/benchmark_weights'
rps:
description: requests per second benchmark weight
allOf:
allOf:
- $ref: '#/components/schemas/benchmark_weights'
benchmark_weights:
type: object
Expand All @@ -2224,4 +2229,4 @@ components:
description: benchmark factor weight
percentage:
type: number
description: benchmark percentage weight
description: benchmark percentage weight
Loading

0 comments on commit 8e3441f

Please sign in to comment.