Skip to content

Commit

Permalink
[opentelemetry-integration] Add the errorTracking spanmetrics preset (#…
Browse files Browse the repository at this point in the history
…475)

Adds the error tracking spanmetrics preset.

Fixes ES-385 by bringing the changes from coralogix/opentelemetry-helm-charts#120.
  • Loading branch information
douglascamata authored Nov 27, 2024
1 parent 65d1ffd commit d70cc18
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 7 deletions.
4 changes: 4 additions & 0 deletions otel-integration/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## OpenTelemtry-Integration

### v0.0.114 / 2024-11-27

- [Feat] Add the `errorTracking` preset. It's enabled by default when `spanMetrics` is also enabled.

### v0.0.113 / 2024-11-21

- [Fix] Setting max_batch_size for logsCollection preset now works on all recombine operators.
Expand Down
12 changes: 6 additions & 6 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.113
version: 0.0.114
keywords:
- OpenTelemetry Collector
- OpenTelemetry Agent
Expand All @@ -11,27 +11,27 @@ keywords:
dependencies:
- name: opentelemetry-collector
alias: opentelemetry-agent
version: "0.98.2"
version: "0.98.3"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-agent.enabled
- name: opentelemetry-collector
alias: opentelemetry-agent-windows
version: "0.98.2"
version: "0.98.3"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-agent-windows.enabled
- name: opentelemetry-collector
alias: opentelemetry-cluster-collector
version: "0.98.2"
version: "0.98.3"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-cluster-collector.enabled
- name: opentelemetry-collector
alias: opentelemetry-receiver
version: "0.98.2"
version: "0.98.3"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-receiver.enabled
- name: opentelemetry-collector
alias: opentelemetry-gateway
version: "0.98.2"
version: "0.98.3"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-gateway.enabled
sources:
Expand Down
32 changes: 32 additions & 0 deletions otel-integration/k8s-helm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,38 @@ spanNameReplacePattern:

This will result in your spans having generalized name `user-{id}`.

#### SpanMetrics Error Tracking

Once you enable the Span Metrics preset, the errorTracking configuration will automatically be enabled.

This is how you can disable the errorTracking option:

```
presets:
spanMetrics:
enabled: true
errorTracking:
enabled: false
```

Note: errorTracking only works with OpenTelemetry SDKs that support OpenTelemetry Semantic conventions above v1.21.0. If you are using older versions, you might need to transform some attributes, such as:

```
http.status_code => http.response.status_code
```

To do that, you can add the following configuration:

```
presets:
spanMetrics:
enabled: true
transformStatements:
- set(attributes["http.response.status_code"], attributes["http.status_code"]) where attributes["http.response.status_code"] == nil
errorTracking:
enabled: true
```

#### SpanMetrics Database Monitoring

Once you enable the Span Metrics preset, the dbMetrics configuration will automatically be enabled. The DbMetrics option generates RED (Request, Errors, Duration) metrics for database spans. For example, query `db_calls_total` to view generated request metrics.
Expand Down
6 changes: 5 additions & 1 deletion otel-integration/k8s-helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ global:
defaultSubsystemName: "integration"
logLevel: "warn"
collectionInterval: "30s"
version: "0.0.113"
version: "0.0.114"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -140,6 +140,10 @@ opentelemetry-agent:
collectionInterval: "{{.Values.global.collectionInterval}}"
spanMetrics:
enabled: false
# transformStatements:
# - set(attributes["http.response.status_code"], attributes["http.status_code"]) where attributes["http.response.status_code"] == nil
errorTracking:
enabled: true
dbMetrics:
enabled: true
# transformStatements:
Expand Down

0 comments on commit d70cc18

Please sign in to comment.