Skip to content

Commit 9c708d2

Browse files
authored
Merge pull request #2416 from flow-php/otel-collector-version
chore: update otel collector version
2 parents 35fc294 + f011c24 commit 9c708d2

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

.github/workflows/job-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
docker run -d --name otel-collector \
6666
-p 4317:4317 -p 4318:4318 -p 8888:8888 -p 13133:13133 \
6767
-v ${{ github.workspace }}/docker/otel-collector-test-config.yaml:/etc/otelcol-contrib/config.yaml:ro \
68-
otel/opentelemetry-collector-contrib:0.144.0
68+
otel/opentelemetry-collector-contrib:0.153.0
6969
# Wait for container to be ready
7070
for i in {1..30}; do
7171
if curl -sf http://localhost:13133/ > /dev/null 2>&1; then

compose.yml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ services:
9898
networks:
9999
- flow-php
100100
otel-collector:
101-
image: otel/opentelemetry-collector-contrib:0.144.0
101+
image: otel/opentelemetry-collector-contrib:0.153.0
102102
container_name: flow-php-otel-collector
103103
command: ["--config=/etc/otel-collector-config.yaml"]
104104
ports:

src/bridge/telemetry/otlp/tests/Flow/Bridge/Telemetry/OTLP/Tests/Integration/CollectorMetrics.php

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
* Helper class to query OTEL Collector's Prometheus metrics endpoint.
1818
*
1919
* Used to verify that telemetry data flows through the collector.
20-
* Queries `otelcol_exporter_sent_*_total` metrics which indicate data was
20+
* Queries `otelcol_exporter_sent_*` metrics which indicate data was
2121
* successfully exported (more reliable than receiver metrics in v0.115+).
22+
* Collector v0.153.0 drops the `_total` suffix on these counters.
2223
* The collector exposes internal metrics at port 8888.
2324
*/
2425
final readonly class CollectorMetrics
@@ -31,17 +32,17 @@ public function __construct(
3132

3233
public function getAcceptedLogRecords(): int
3334
{
34-
return $this->getMetricValue('otelcol_exporter_sent_log_records_total');
35+
return $this->getMetricValue('otelcol_exporter_sent_log_records');
3536
}
3637

3738
public function getAcceptedMetricPoints(): int
3839
{
39-
return $this->getMetricValue('otelcol_exporter_sent_metric_points_total');
40+
return $this->getMetricValue('otelcol_exporter_sent_metric_points');
4041
}
4142

4243
public function getAcceptedSpans(): int
4344
{
44-
return $this->getMetricValue('otelcol_exporter_sent_spans_total');
45+
return $this->getMetricValue('otelcol_exporter_sent_spans');
4546
}
4647

4748
/**
@@ -53,7 +54,7 @@ public function getAcceptedSpans(): int
5354
*/
5455
public function waitForLogRecords(int $threshold, int $timeoutMs = 5000, int $pollIntervalMs = 10): int
5556
{
56-
return $this->waitForMetric('otelcol_exporter_sent_log_records_total', $threshold, $timeoutMs, $pollIntervalMs);
57+
return $this->waitForMetric('otelcol_exporter_sent_log_records', $threshold, $timeoutMs, $pollIntervalMs);
5758
}
5859

5960
/**
@@ -65,12 +66,7 @@ public function waitForLogRecords(int $threshold, int $timeoutMs = 5000, int $po
6566
*/
6667
public function waitForMetricPoints(int $threshold, int $timeoutMs = 5000, int $pollIntervalMs = 10): int
6768
{
68-
return $this->waitForMetric(
69-
'otelcol_exporter_sent_metric_points_total',
70-
$threshold,
71-
$timeoutMs,
72-
$pollIntervalMs,
73-
);
69+
return $this->waitForMetric('otelcol_exporter_sent_metric_points', $threshold, $timeoutMs, $pollIntervalMs);
7470
}
7571

7672
/**
@@ -82,7 +78,7 @@ public function waitForMetricPoints(int $threshold, int $timeoutMs = 5000, int $
8278
*/
8379
public function waitForSpans(int $threshold, int $timeoutMs = 5000, int $pollIntervalMs = 10): int
8480
{
85-
return $this->waitForMetric('otelcol_exporter_sent_spans_total', $threshold, $timeoutMs, $pollIntervalMs);
81+
return $this->waitForMetric('otelcol_exporter_sent_spans', $threshold, $timeoutMs, $pollIntervalMs);
8682
}
8783

8884
private function getMetricValue(string $metricName): int

0 commit comments

Comments
 (0)