Skip to content

Conversation

@rads-1996
Copy link
Member

No description provided.

@rads-1996 rads-1996 marked this pull request as ready for review December 9, 2025 01:15
@rads-1996 rads-1996 requested a review from a team as a code owner December 9, 2025 01:15
Copilot AI review requested due to automatic review settings December 9, 2025 01:15
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 noop (no-operation) implementations for the OpenTelemetry metrics API, enabling the SDK to provide safe default behavior when metrics functionality is disabled or not configured. The PR introduces two new interface type definitions and two noop factory functions.

Key changes:

  • Added IObservableCallback and IMetricAttributes type definitions for metrics support
  • Implemented createNoopMeter() and createNoopMeterProvider() factory functions that return non-functional metric implementations

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
shared/OpenTelemetry/src/interfaces/metrics/meter/IObservableCallback.ts Defines callback type for observable metrics with generic attribute types
shared/OpenTelemetry/src/interfaces/metrics/meter/IMetricAttributes.ts Type alias for metric attributes extending base OTel attributes
shared/OpenTelemetry/src/api/noop/noopMeterProvider.ts Factory function creating noop meter provider implementation
shared/OpenTelemetry/src/api/noop/noopMeter.ts Factory functions for noop meter and all metric types (Counter, Gauge, Histogram, Observable variants)

@rads-1996 rads-1996 changed the title Add Noop Metrics Follow up PR: Address feedback on OTEL Logs SDK Dec 10, 2025
const handlers: IOTelErrorHandlers = {};
const attributeContainer = createAttributeContainer<any>(
{
traceCfg: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The config should be injected from the main config and not applied here as it's own version (non-user configurable)

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.

2 participants