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

[otel-integration] fix allow setting dimensions for otel collector #413

Merged
merged 1 commit into from
May 29, 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.74 / 2024-05-28
- [FEAT] Bump Collector to 0.101.0
- [FEAT] Allow setting dimensions to spanMetricsMulti preset

### v0.0.73 / 2024-05-28
- [FEAT] Bump Helm chart dependencies.
- [FEAT] Allowing loadBalancing presets dns configs (timout and resolver interval).
Expand Down
10 changes: 5 additions & 5 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.73
version: 0.0.74
keywords:
- OpenTelemetry Collector
- OpenTelemetry Agent
Expand All @@ -11,22 +11,22 @@ keywords:
dependencies:
- name: opentelemetry-collector
alias: opentelemetry-agent
version: "0.84.1"
version: "0.85.0"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-agent.enabled
- name: opentelemetry-collector
alias: opentelemetry-agent-windows
version: "0.84.1"
version: "0.85.0"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-agent-windows.enabled
- name: opentelemetry-collector
alias: opentelemetry-cluster-collector
version: "0.84.1"
version: "0.85.0"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-cluster-collector.enabled
- name: opentelemetry-collector
alias: opentelemetry-gateway
version: "0.84.1"
version: "0.85.0"
repository: https://cgx.jfrog.io/artifactory/coralogix-charts-virtual
condition: opentelemetry-gateway.enabled
sources:
Expand Down
4 changes: 2 additions & 2 deletions otel-integration/k8s-helm/e2e-test/expected_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var expectedSchemaURL = map[string]bool{
"https://opentelemetry.io/schemas/1.9.0": false,
}

const expectedScopeVersion = "0.100.0"
const expectedScopeVersion = "0.101.0"

var expectedScopeNames = map[string]bool{
"otelcol/hostmetricsreceiver/network": false,
Expand Down Expand Up @@ -127,7 +127,7 @@ var expectedMetrics map[string]bool = map[string]bool{
"otelcol_process_runtime_total_sys_memory_bytes": false,
"otelcol_process_uptime": false,
"otelcol_processor_accepted_metric_points": false,
"otelcol_processor_batch_metadata_cardinality": false,
"otelcol_processor_batch_": false,
"otelcol_receiver_refused_log_records": false,
"otelcol_receiver_refused_metric_points": false,
"otelcol_processor_dropped_metric_points": false,
Expand Down
4 changes: 4 additions & 0 deletions otel-integration/k8s-helm/e2e-test/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"testing"
"time"

"github.com/davecgh/go-spew/spew"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component/componenttest"
Expand Down Expand Up @@ -109,6 +110,9 @@ func checkScopeMetrics(t *testing.T, rmetrics pmetric.ResourceMetrics) error {
if ok {
expectedMetrics[metric.Name()] = true
}
if !ok {
spew.Dump(metric)
}
povilasv marked this conversation as resolved.
Show resolved Hide resolved
require.True(t, ok, "metrics %v does not match one of the expected values", metric.Name())
}
}
Expand Down
10 changes: 9 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.73"
version: "0.0.74"

extensions:
kubernetesDashboard:
Expand Down Expand Up @@ -136,6 +136,10 @@ opentelemetry-agent:
enabled: false
collectionInterval: "{{.Values.global.collectionInterval}}"
metricsExpiration: 5m
extraDimensions:
- name: http.method
- name: cgx.transaction
- name: cgx.transaction.root
defaultHistogramBuckets:
[1ms, 4ms, 10ms, 20ms, 50ms, 100ms, 200ms, 500ms, 1s, 2s, 5s]
configs: []
Expand Down Expand Up @@ -375,6 +379,10 @@ opentelemetry-cluster-collector:
enabled: true
clusterName: "{{.Values.global.clusterName}}"
integrationName: "coralogix-integration-helm"
# Removes uids and other uneeded attributes from metric resources.
# This reduces target_info cardinality.
reduceResourceAttributes:
enabled: false

extraEnvs:
- name: CORALOGIX_PRIVATE_KEY
Expand Down
Loading