Skip to content

Commit

Permalink
update to use include/exclude
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
codeboten committed May 8, 2024
1 parent 69aaff9 commit b38388d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/kitchen-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ meter_provider:
# Configure Prometheus Exporter to produce metrics without a scope info metric.
without_scope_info: false
# Configure Prometheus Exporter to add resource attributes as metrics attributes.
with_resource_constant_labels: "service\\.[.]*"
with_resource_constant_labels:
included:
- "service.*"
excluded:
- "otherattribute"
# Configure a periodic metric reader.
- periodic:
# Configure delay interval (in milliseconds) between start of two consecutive exports.
Expand Down
18 changes: 18 additions & 0 deletions schema/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@
}
}
},
"IncludeExclude": {
"type": "object",
"additionalProperties": false,
"properties": {
"included": {
"type": "array",
"items": {
"type": "string"
}
},
"excluded": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"Otlp": {
"type": "object",
"additionalProperties": false,
Expand Down
2 changes: 1 addition & 1 deletion schema/meter_provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"type": "boolean"
},
"with_resource_constant_labels": {
"type": "string"
"$ref": "common.json#/$defs/IncludeExclude"
}
}
},
Expand Down

0 comments on commit b38388d

Please sign in to comment.