Skip to content

Conversation

@kirqz23
Copy link
Contributor

@kirqz23 kirqz23 commented Jan 13, 2026

This introduces beholder.config.info metric that aggregates beholder settings as attributes and allows to track app configuration

This feature especially will help us understand which nodes are using logs streaming. Currently both custom events and logs are processed through the same intrumentation and gRPC built-in metrics with LogExporter are not specific.

Copilot AI review requested due to automatic review settings January 13, 2026 12:34
@kirqz23 kirqz23 requested a review from a team as a code owner January 13, 2026 12:34
@kirqz23 kirqz23 marked this pull request as draft January 13, 2026 12:34
@github-actions
Copy link

👋 kirqz23, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link

✅ API Diff Results - No breaking changes


📄 View full apidiff report

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new beholder.config.info metric to track Beholder SDK configuration settings. The metric records configuration as attributes, making it easier to monitor which nodes are using specific features like log streaming.

Changes:

  • Added beholderConfigMetric function that creates an Int64Gauge metric to record Beholder configuration
  • Integrated the config metric recording during client initialization
  • Exposed configuration settings for logging, message emitter, tracing, and metrics as metric attributes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

attribute.String("metric_compressor", cfg.MetricCompressor),
}

configGauge.Record(context.Background(), 1, otelmetric.WithAttributes(configAttrs...))
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

Using context.Background() for metric recording may prevent proper cancellation and timeout handling. Consider accepting a context parameter in beholderConfigMetric() and passing it from NewGRPCClient() to allow proper context propagation.

Suggested change
configGauge.Record(context.Background(), 1, otelmetric.WithAttributes(configAttrs...))
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
configGauge.Record(ctx, 1, otelmetric.WithAttributes(configAttrs...))

Copilot uses AI. Check for mistakes.
attribute.String("metric_compressor", cfg.MetricCompressor),
}

configGauge.Record(context.Background(), 1, otelmetric.WithAttributes(configAttrs...))
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The gauge is recorded only once during initialization. Since gauges represent a point-in-time value that can change, consider using an async gauge (Int64ObservableGauge) or explicitly documenting that this is a one-time initialization metric that won't update if configuration changes at runtime.

Copilot uses AI. Check for mistakes.
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