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

[opentelemetry-integration] Add the errorTracking spanmetrics preset #475

Merged
merged 2 commits into from
Nov 27, 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
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
Loading