Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option WithMemory to opentelemetry's prometheus exporter #501

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

## Unreleased
### Enhancements
- Add an option `WithMemory` to OpenTelemetry's Prometheus exporter. It allows users to control whether metrics that haven't been updated in the most recent interval are reported. ([#501](https://github.com/KindlingProject/kindling/pull/501))
- Add a config to cgoreceiver for suppressing events according to processes' comm ([#495](https://github.com/KindlingProject/kindling/pull/495))
- Add bind support to get the listening ip and port of a server. ([#493](https://github.com/KindlingProject/kindling/pull/493))
- Add an option `enable_fetch_replicaset` to control whether to fetch ReplicaSet metadata. The default value is false which aims to release pressure on Kubernetes API server. ([#492](https://github.com/KindlingProject/kindling/pull/492))
Expand Down
5 changes: 5 additions & 0 deletions collector/docker/kindling-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ exporters:
custom_labels:
prometheus:
port: :9500
# with_memory sets the memory behavior of the exporter. If this is
# true, the exporter will report metric instruments and label sets
# that were previously reported but not updated in the most recent
# interval.
with_memory: false
otlp:
collect_period: 15s
# Note: DO NOT add the prefix "http://"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ type Config struct {
}

type PrometheusConfig struct {
Port string `mapstructure:"port,omitempty"`
Port string `mapstructure:"port,omitempty"`
WithMemory bool `mapstructure:"with_memory,omitempty"`
}

type OtlpGrpcConfig struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func NewExporter(config interface{}, telemetry *component.TelemetryTools) export
histogram.WithExplicitBoundaries(exponentialInt64NanosecondsBoundaries),
),
aggregation.CumulativeTemporalitySelector(),
otelprocessor.WithMemory(cfg.PromCfg.WithMemory),
),
controller.WithResource(rs),
)
Expand Down
5 changes: 5 additions & 0 deletions deploy/agent/kindling-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ exporters:
custom_labels:
prometheus:
port: :9500
# with_memory sets the memory behavior of the exporter. If this is
# true, the exporter will report metric instruments and label sets
# that were previously reported but not updated in the most recent
# interval.
with_memory: false
otlp:
collect_period: 15s
# Note: DO NOT add the prefix "http://"
Expand Down