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

feat(metrics): add selectors for Prometheus CRs to otel metrics collector #3096

Merged
merged 1 commit into from
Jun 22, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/3096.added.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feat(metrics): add selectors for Prometheus CRs to otel metrics collector
2 changes: 2 additions & 0 deletions deploy/helm/sumologic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ The following table lists the configurable parameters of the Sumo Logic chart an
| `sumologic.metrics.collector.otelcol.autoscaling.minReplicas` | Default min replicas for autoscaling. collector | `3` |
| `sumologic.metrics.collector.otelcol.autoscaling.targetCPUUtilizationPercentage` | The desired target CPU utilization for autoscaling. | `100` |
| `sumologic.metrics.collector.otelcol.autoscaling.targetMemoryUtilizationPercentage` | The desired target memory utilization for autoscaling. | `50` |
| `sumologic.metrics.collector.otelcol.serviceMonitorSelector` | Selector for ServiceMonitors used for target discovery. See: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr | `{}` |
| `sumologic.metrics.collector.otelcol.podMonitorSelector` | Selector for PodMonitors used for target discovery. See: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr | `{}` |
| `sumologic.traces.enabled` | Set the enabled flag to true to enable tracing ingestion. _Tracing must be enabled for the account first. Please contact your Sumo representative for activation details_ | `true` |
| `sumologic.traces.spans_per_request` | Maximum number of spans sent in single batch | `100` |
| `sumologic.envFromSecret` | If enabled, accessId and accessKey will be sourced from Secret Name given. Be sure to include at least the following env variables in your secret (1) SUMOLOGIC_ACCESSID, (2) SUMOLOGIC_ACCESSKEY | `sumo-api-secret` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ spec:
enabled: true
prometheusCR:
enabled: true
serviceMonitorSelector:
{{ .Values.sumologic.metrics.collector.otelcol.serviceMonitorSelector | toYaml | nindent 8 }}
podMonitorSelector:
{{ .Values.sumologic.metrics.collector.otelcol.podMonitorSelector | toYaml | nindent 8 }}
{{- if .Values.sumologic.metrics.collector.otelcol.autoscaling.enabled }}
autoscaler:
maxReplicas: {{ .Values.sumologic.metrics.collector.otelcol.autoscaling.maxReplicas }}
Expand Down
8 changes: 8 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,14 @@ sumologic:
memory: 768Mi
cpu: 500m

## Selector for ServiceMonitors used for target discovery.
## See https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr
serviceMonitorSelector: {}

## Selector for PodMonitors used for target discovery.
## See https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md#opentelemetrycollectorspectargetallocatorprometheuscr
podMonitorSelector: {}

otelcol:
## Includes additional processors into pipelines.
## It can be used for filtering metrics, renaming, changing metadata and so on.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ spec:
enabled: true
prometheusCR:
enabled: true
serviceMonitorSelector: {}
podMonitorSelector: {}
env:
- name: SUMO_ENDPOINT_APISERVER_METRICS_SOURCE
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@ sumologic:
requests:
memory: 1Gi
cpu: 1000m
serviceMonitorSelector:
smkey: smvalue
podMonitorSelector:
pmkey: pmvalue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
enabled: true
prometheusCR:
enabled: true
serviceMonitorSelector:
smkey: smvalue
podMonitorSelector:
pmkey: pmvalue
autoscaler:
maxReplicas: 30
minReplicas: 15
Expand Down