Skip to content

Conversation

@pkcll
Copy link
Contributor

@pkcll pkcll commented Jan 28, 2025

Implement Prometheus to OTel metrics conversion and export.

Forwarder:

  • Gets metrics from prometheus.Gatherer and exports them to provided OTLP/GRPC endpoint. Uses piped Receiver and Exporter.

Receiver:

Exporter:

  • Wraps otlpexporter
  • Receives metric data from the receiver
  • Export OTel metrics data to otel collector endpoint via otlpexporter

Upstream PR's

Downstream PR's

Run Example

cd chainlink-common/pkg/promotel

# Start OTel Collector
docker run \
 -p 127.0.0.1:4317:4317 \
 otel/opentelemetry-collector-contrib:0.118.0

# Run example test
go test -timeout 30s -run ^TestExample$ github.com/smartcontractkit/chainlink-common/pkg/promotel/internal

OTel Collector logs with exported test metric TestExample_test_counter_metric

Metric #4
otelcollectoragent  | Descriptor:
otelcollectoragent  |      -> Name: TestExample_test_counter_metric
otelcollectoragent  |      -> Description:
otelcollectoragent  |      -> Unit:
otelcollectoragent  |      -> DataType: Sum
otelcollectoragent  |      -> IsMonotonic: true
otelcollectoragent  |      -> AggregationTemporality: Cumulative
otelcollectoragent  | NumberDataPoints #0
otelcollectoragent  | StartTimestamp: 2025-02-12 15:27:56.202 +0000 UTC
otelcollectoragent  | Timestamp: 2025-02-12 15:27:56.202 +0000 UTC
otelcollectoragent  | Value: 1.000000

@pkcll pkcll force-pushed the INFOPLAT-1575/promotel-forked branch from 0b5d061 to f041f3f Compare February 6, 2025 02:57
@pkcll pkcll force-pushed the INFOPLAT-1575/promotel-forked branch from f041f3f to b2e263e Compare February 6, 2025 03:04
@pkcll pkcll force-pushed the INFOPLAT-1575/promotel-forked branch from b2e263e to 09fdd3d Compare February 6, 2025 03:05
@pkcll pkcll force-pushed the INFOPLAT-1575/promotel-forked branch from 82ad449 to f0f83de Compare February 6, 2025 09:27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did we end up more than doubling (+150) our dependencies? Are these all from otel?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The k8s deps in particular are concerning. We have had enough trouble with those just in our test modules. I don't think we can allow it to infect everything like this.

@github-actions
Copy link

This PR is stale because it has been open 30 days with no activity.
Remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jun 13, 2025
@github-actions
Copy link

This PR has been automatically closed because it has been stale for > 30 days.
If you wish to continue working on this PR, please reopen it and make any necessary changes.

@github-actions github-actions bot closed this Jun 22, 2025
@github-actions github-actions bot deleted the INFOPLAT-1575/promotel-forked branch June 22, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants