-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Account for mssql test container recovery flake * test: Add signalfx exporter translation integration tests * Release v0.61.0
- Loading branch information
1 parent
20af37d
commit f530150
Showing
12 changed files
with
382 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright Splunk, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package tests | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/signalfx/splunk-otel-collector/tests/testutils" | ||
) | ||
|
||
func TestSignalFxExporterTranslatesOTelCPUMetrics(t *testing.T) { | ||
testutils.AssertAllMetricsReceived( | ||
t, "cpu_translations.yaml", "cpu_translations_config.yaml", nil, | ||
) | ||
} | ||
|
||
func TestSignalFxExporterTranslatesOTelMemoryMetrics(t *testing.T) { | ||
testutils.AssertAllMetricsReceived( | ||
t, "memory_translations.yaml", "memory_translations_config.yaml", nil, | ||
) | ||
} |
26 changes: 26 additions & 0 deletions
26
tests/exporters/signalfx/testdata/cpu_translations_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
receivers: | ||
hostmetrics: | ||
collection_interval: 1s | ||
scrapers: | ||
cpu: | ||
signalfx: | ||
endpoint: 127.0.0.1:9943 | ||
|
||
exporters: | ||
signalfx: | ||
access_token: token | ||
ingest_url: http://127.0.0.1:9943 | ||
api_url: http://127.0.0.1:9943 | ||
otlp: | ||
endpoint: "${OTLP_ENDPOINT}" | ||
tls: | ||
insecure: true | ||
|
||
service: | ||
pipelines: | ||
metrics/in: | ||
receivers: [hostmetrics] | ||
exporters: [signalfx] | ||
metrics/out: | ||
receivers: [signalfx] | ||
exporters: [otlp] |
26 changes: 26 additions & 0 deletions
26
tests/exporters/signalfx/testdata/memory_translations_config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
receivers: | ||
hostmetrics: | ||
collection_interval: 1s | ||
scrapers: | ||
memory: | ||
signalfx: | ||
endpoint: 127.0.0.1:9943 | ||
|
||
exporters: | ||
signalfx: | ||
access_token: token | ||
ingest_url: http://127.0.0.1:9943 | ||
api_url: http://127.0.0.1:9943 | ||
otlp: | ||
endpoint: "${OTLP_ENDPOINT}" | ||
tls: | ||
insecure: true | ||
|
||
service: | ||
pipelines: | ||
metrics/in: | ||
receivers: [hostmetrics] | ||
exporters: [signalfx] | ||
metrics/out: | ||
receivers: [signalfx] | ||
exporters: [otlp] |
9 changes: 9 additions & 0 deletions
9
tests/exporters/signalfx/testdata/resource_metrics/cpu_translations.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource_metrics: | ||
- instrumentation_library_metrics: | ||
- metrics: | ||
- name: cpu.utilization | ||
type: DoubleGauge | ||
- name: cpu.num_processors | ||
type: IntGauge | ||
- name: cpu.idle | ||
type: IntMonotonicCumulativeSum |
33 changes: 33 additions & 0 deletions
33
tests/exporters/signalfx/testdata/resource_metrics/memory_translations.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
resource_metrics: | ||
- instrumentation_library_metrics: | ||
- metrics: | ||
- name: system.memory.usage | ||
labels: | ||
state: used | ||
type: IntGauge | ||
- name: system.memory.usage | ||
labels: | ||
state: free | ||
type: IntGauge | ||
- name: system.memory.usage | ||
labels: | ||
state: buffered | ||
type: IntGauge | ||
- name: system.memory.usage | ||
labels: | ||
state: cached | ||
type: IntGauge | ||
- name: system.memory.usage | ||
labels: | ||
state: slab_reclaimable | ||
type: IntGauge | ||
- name: system.memory.usage | ||
labels: | ||
state: slab_unreclaimable | ||
type: IntGauge | ||
- name: memory.total | ||
labels: {} | ||
type: IntGauge | ||
- name: memory.utilization | ||
labels: {} | ||
type: DoubleGauge |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters