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

Collection interval feature #358

Merged
merged 6 commits into from
Jan 25, 2024
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
5 changes: 5 additions & 0 deletions otel-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## OpenTelemtry-Integration

### v0.0.50 / 2024-01-18

- [FEAT] Add global metric collection interval. This **changes** the default value of collection interval for all receivers to `30s` by default.
- [FIX] Suppress generation of `service.name` from collector telemetry.

### v0.0.49 / 2024-01-18

- [CHORE] Update Windows collector image to `v0.92.0`.
Expand Down
8 changes: 4 additions & 4 deletions otel-integration/k8s-helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: otel-integration
description: OpenTelemetry Integration
version: 0.0.49
version: 0.0.50
keywords:
- OpenTelemetry Collector
- OpenTelemetry Agent
Expand All @@ -11,17 +11,17 @@ keywords:
dependencies:
- name: opentelemetry-collector
alias: opentelemetry-agent
version: "0.79.1"
version: "0.79.2"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-agent.enabled
- name: opentelemetry-collector
alias: opentelemetry-agent-windows
version: "0.79.1"
version: "0.79.2"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-agent-windows.enabled
- name: opentelemetry-collector
alias: opentelemetry-cluster-collector
version: "0.79.1"
version: "0.79.2"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-cluster-collector.enabled
sources:
Expand Down
9 changes: 9 additions & 0 deletions otel-integration/k8s-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ For more details on Prometheus custom resources and target allocator see the doc

Installing `otel-integration` is also possible on clusters that support running Windows workloads on Windows node alongside Linux nodes (such as [EKS](https://docs.aws.amazon.com/eks/latest/userguide/windows-support.html), [AKS](https://learn.microsoft.com/en-us/azure/aks/windows-faq?tabs=azure-cli) or [GKE](https://cloud.google.com/kubernetes-engine/docs/how-to/creating-a-cluster-windows)). The collector will be installed on Linux nodes, as these components are supported only on Linux operating systems. Conversely, the agent will be installed on both Linux and Windows nodes as a daemonset, in order to collect metrics for both operating systems. In order to do so, the chart needs to be installed with few adjustments.

Depending on your Windows server version, you might need to adjust the image you are using with the Windows agent. The default image is `coralogixrepo/opentelemetry-collector-contrib-windows:<semantic_version>`. For Windows 2022 servers, please use `coralogixrepo/opentelemetry-collector-contrib-windows:<semantic_version>-windows2022` version. You can do this by adjusting the `opentelemetry-agent-windows.image.tag` value in the `values-windows.yaml` file.

First make sure to add our Helm charts repository to the local repos list with the following command:

```bash
Expand Down Expand Up @@ -251,6 +253,12 @@ env:
value: "http://$(NODE):4317"
```

### About global collection interval

The global collection interval (`global.collectionInterval`) is the interval in which the collector will collect metrics from the configured receivers. For most optimal default experience, we recommend using the 30 second interval set by the chart. However, if you'd prefer to collect metrics more (or less) often, you can adjust the interval by changing the `global.collectionInterval` value in the `values.yaml` file. The minimal recommended global interval is `15s`. If you wish to use default value for *each* component set internally by the collector, you can remove the collection interval parameter from presets completely.

Beware that using lower interval will result in more metric data points being sent to the backend, thus resulting in more costs. Note that the choise of the interval also has an effect on behavior of rate functions, for more see [here](https://www.robustperception.io/what-range-should-i-use-with-rate/).

### About span metrics

The collector provides a possibility to synthesize R.E.D (Request, Error, Duration) metrics based on the incoming span data. This can be useful to obtain extra metrics about the operations you have instrumented for tracing. For more information, please refer to the [OpenTelemetry Collector documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/spanmetricsconnector/README.md).
Expand Down Expand Up @@ -399,6 +407,7 @@ Optional settings:
instances:
- username: "otel-coralogix-collector"
password: ${env:MYSQL_PASSWORD}
collectionInterval: 30s
extraLogs:
enabled: true
volumeMountName: "data"
Expand Down
8 changes: 7 additions & 1 deletion otel-integration/k8s-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ global:
defaultApplicationName: "otel"
defaultSubsystemName: "integration"
logLevel: "warn"
matej-g marked this conversation as resolved.
Show resolved Hide resolved
collectionInterval: "30s"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -100,10 +101,13 @@ opentelemetry-agent:
enabled: true
hostMetrics:
enabled: true
collectionInterval: "{{.Values.global.collectionInterval}}"
kubeletMetrics:
enabled: true
collectionInterval: "{{.Values.global.collectionInterval}}"
spanMetrics:
enabled: false
collectionInterval: "{{.Values.global.collectionInterval}}"
histogramBuckets: [10ms, 20ms, 50ms, 100ms, 200ms, 500ms, 1s, 2s, 5s]

config:
Expand Down Expand Up @@ -195,6 +199,7 @@ opentelemetry-agent:
# Supress this attribute, as we don't want the UUID of the collector to be sent,
# instead we rely on instance label generated by Prometheus receiver.
- service.instance.id:
- service.name:
logs:
level: "{{ .Values.global.logLevel }}"
encoding: json
Expand Down Expand Up @@ -341,7 +346,7 @@ opentelemetry-cluster-collector:
endpoint: localhost:1777
receivers:
k8s_cluster:
collection_interval: 10s
collection_interval: "{{.Values.global.collectionInterval}}"
allocatable_types_to_report: [cpu, memory]
resource_attributes:
k8s.kubelet.version:
Expand Down Expand Up @@ -467,6 +472,7 @@ opentelemetry-cluster-collector:
# Supress this attribute, as we don't want the UUID of the collector to be sent,
# instead we rely on instance label generated by Prometheus receiver.
- service.instance.id:
- service.name:
logs:
level: "{{ .Values.global.logLevel }}"
encoding: json
Expand Down
Loading