Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions logfire/_internal/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,12 +955,8 @@ def check_token():
headers=headers,
session=session,
compression=Compression.Gzip,
# I'm pretty sure that this line here is redundant,
# and that passing it to the QuietMetricExporter is what matters
# because the PeriodicExportingMetricReader will read it from there.
preferred_temporality=METRICS_PREFERRED_TEMPORALITY,
),
preferred_temporality=METRICS_PREFERRED_TEMPORALITY,
)
)
)
)
Expand Down
10 changes: 5 additions & 5 deletions logfire/_internal/exporters/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
from opentelemetry import context
from opentelemetry.sdk._logs import LogData, LogRecordProcessor
from opentelemetry.sdk._logs.export import LogExporter, LogExportResult
from opentelemetry.sdk.metrics.export import AggregationTemporality, MetricExporter, MetricExportResult, MetricsData
from opentelemetry.sdk.metrics.view import Aggregation
from opentelemetry.sdk.metrics.export import MetricExporter, MetricExportResult, MetricsData
from opentelemetry.sdk.trace import ReadableSpan, Span, SpanProcessor
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult

Expand Down Expand Up @@ -36,10 +35,11 @@ class WrapperMetricExporter(MetricExporter):
def __init__(
self,
exporter: MetricExporter,
preferred_temporality: dict[type, AggregationTemporality] | None = None,
preferred_aggregation: dict[type, Aggregation] | None = None,
) -> None:
super().__init__(preferred_temporality=preferred_temporality, preferred_aggregation=preferred_aggregation) # type: ignore
super().__init__( # type: ignore
preferred_temporality=exporter._preferred_temporality,
Copy link
Contributor

Choose a reason for hiding this comment

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

Reading protected attributes doesn't really feel better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough, I'll just update comments as part of #1048

preferred_aggregation=exporter._preferred_aggregation, # type: ignore
)
self.wrapped_exporter = exporter

def export(self, metrics_data: MetricsData, timeout_millis: float = 10_000, **kwargs: Any) -> MetricExportResult:
Expand Down
Loading