Skip to content

Add separate telemetry package - #2485

Closed
cedric-cordenier wants to merge 8 commits into
mainfrom
telemetry
Closed

cedric-cordenier wants to merge 8 commits into
mainfrom
telemetry

Conversation

@cedric-cordenier

Copy link
Copy Markdown
Contributor

Requires

Supports

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (47)

pkg/loop (2)
  • SetupTracing — Type changed:
func(
  TracingConfig
)
error
  • TracingConfig — Type changed:
  - TracingConfig
  + github.com/smartcontractkit/chainlink-common/pkg/loop/telemetry.TracingConfig
)
pkg/loop.EnvConfig (45)
  • ChipIngressBatchEmitterEnabled — 🗑️ Removed

  • ChipIngressBufferSize — 🗑️ Removed

  • ChipIngressDrainTimeout — 🗑️ Removed

  • ChipIngressDurableEmitterEnabled — 🗑️ Removed

  • ChipIngressEndpoint — 🗑️ Removed

  • ChipIngressInsecureConnection — 🗑️ Removed

  • ChipIngressMaxBatchSize — 🗑️ Removed

  • ChipIngressMaxConcurrentSends — 🗑️ Removed

  • ChipIngressMaxGRPCRequestSize — 🗑️ Removed

  • ChipIngressSendInterval — 🗑️ Removed

  • ChipIngressSendTimeout — 🗑️ Removed

  • TelemetryAttributes — 🗑️ Removed

  • TelemetryAuthHeaders — 🗑️ Removed

  • TelemetryAuthHeadersTTL — 🗑️ Removed

  • TelemetryAuthPubKeyHex — 🗑️ Removed

  • TelemetryCACertFile — 🗑️ Removed

  • TelemetryEmitterBatchProcessor — 🗑️ Removed

  • TelemetryEmitterExportInterval — 🗑️ Removed

  • TelemetryEmitterExportMaxBatchSize — 🗑️ Removed

  • TelemetryEmitterExportTimeout — 🗑️ Removed

  • TelemetryEmitterMaxQueueSize — 🗑️ Removed

  • TelemetryEnabled — 🗑️ Removed

  • TelemetryEndpoint — 🗑️ Removed

  • TelemetryInsecureConnection — 🗑️ Removed

  • TelemetryLogBatchProcessor — 🗑️ Removed

  • TelemetryLogCompressor — 🗑️ Removed

  • TelemetryLogExportInterval — 🗑️ Removed

  • TelemetryLogExportMaxBatchSize — 🗑️ Removed

  • TelemetryLogExportTimeout — 🗑️ Removed

  • TelemetryLogLevel — 🗑️ Removed

  • TelemetryLogMaxQueueSize — 🗑️ Removed

  • TelemetryLogStreamingEnabled — 🗑️ Removed

  • TelemetryMetricCardinalityLimit — 🗑️ Removed

  • TelemetryMetricCompressor — 🗑️ Removed

  • TelemetryMetricExportBatchSize — 🗑️ Removed

  • TelemetryMetricViewsDenyAttributes — 🗑️ Removed

  • TelemetryPrometheusBridgeEnabled — 🗑️ Removed

  • TelemetryPrometheusBridgePrefixes — 🗑️ Removed

  • TelemetryTraceCompressor — 🗑️ Removed

  • TelemetryTraceSampleRatio — 🗑️ Removed

  • TracingAttributes — 🗑️ Removed

  • TracingCollectorTarget — 🗑️ Removed

  • TracingEnabled — 🗑️ Removed

  • TracingSamplingRatio — 🗑️ Removed

  • TracingTLSCertPath — 🗑️ Removed

✅ Compatible Changes (3)

package github (1)
  • com/smartcontractkit/chainlink-common/pkg/loop/telemetry — ➕ Added
pkg/loop.EnvConfig (1)
  • TelemetryConfig — ➕ Added
pkg/loop/telemetry.(*TelemetryConfig) (1)
  • Parse — ➕ Added

📄 View full apidiff report

@cedric-cordenier
cedric-cordenier force-pushed the telemetry branch 3 times, most recently from e2cc8f0 to c8412dc Compare October 21, 2026 17:59

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: c8412dc Previous: d7aa0a4 Ratio
BenchmarkKeystore_Sign/nop/in-process 851.4 ns/op 355.7 ns/op 2.39

This comment was automatically generated by workflow using github-action-benchmark.

cedric-cordenier and others added 8 commits October 22, 2026 10:57
Tracing, beholder and chip ingress configuration moves out of EnvConfig
and Server into a package of its own, so it can be used without
loop.Server:

- TelemetryConfig holds the Tracing*, Telemetry* and ChipIngress* fields
  and is embedded in EnvConfig, so they're still promoted. Its env is
  written by AsCmdEnv and read by Parse, under the same names.
- NewTelemetry builds the tracing config and beholder client that
  Server.start built inline. Telemetry is a service that installs the
  client as the global when built and puts the previous one back when
  closed; Server holds it in place of the bare client.
- TracingConfig and SetupTracing move too; loop keeps an alias and a
  forwarding func.

Env var names and parsing are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The instance ID was written into the EnvConfig's own map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A nil TelemetryMetricCardinalityLimit was dereferenced. Parse always sets
it when telemetry is enabled, but a TelemetryConfig built any other way
needn't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With singular toml keys, x/config/cli reads each map entry from the env
var AsCmdEnv writes (CL_TRACING_ATTRIBUTE_<k>, CL_TELEMETRY_ATTRIBUTE_<k>),
and TelemetryAuthHeaders no longer claims CL_TELEMETRY_AUTH_HEADERS_TTL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Auth headers were written as CL_TELEMETRY_AUTH_HEADER<key>, which
x/config/cli can't read. AsCmdEnv now writes CL_TELEMETRY_AUTH_HEADER_<key>
as well, and Parse reads that form first, falling back to the old one so
older hosts and LOOPs keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NewTelemetry checked only for an endpoint. Parse leaves the endpoint
blank when CL_TELEMETRY_ENABLED is false, but hosts set it either way,
so a reader that decodes every env var, such as x/config/cli, would
start a beholder client a LOOP wouldn't.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant