From 2e6987897abd7272b25e8abbb7492dd961bd9c4c Mon Sep 17 00:00:00 2001 From: Stephen Goodall Date: Fri, 1 Nov 2024 17:45:07 +1100 Subject: [PATCH] fix: Use iterable for Aggregation preference --- src/otel/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/otel/__init__.py b/src/otel/__init__.py index 57ffc3c..0d7ad1e 100644 --- a/src/otel/__init__.py +++ b/src/otel/__init__.py @@ -35,11 +35,11 @@ def getSpanExporter(endpoint, headers, protocol): def getMetricExporter(endpoint, headers, protocol): match protocol: case "HTTP": - return HTTPOTLPMetricExporter(endpoint=endpoint, headers=headers, preferred_aggregation= AggregationTemporality.DELTA) + return HTTPOTLPMetricExporter(endpoint=endpoint, headers=headers, preferred_aggregation={AggregationTemporality.DELTA}) case "GRPC": - return GRPCOTLPMetricExporter(endpoint=endpoint, headers=headers, preferred_aggregation= AggregationTemporality.DELTA) + return GRPCOTLPMetricExporter(endpoint=endpoint, headers=headers, preferred_aggregation={AggregationTemporality.DELTA}) case _: - return HTTPOTLPMetricExporter(endpoint=endpoint, headers=headers, preferred_aggregation= AggregationTemporality.DELTA) + return HTTPOTLPMetricExporter(endpoint=endpoint, headers=headers, preferred_aggregation={AggregationTemporality.DELTA}) def create_otel_attributes(atts, GITHUB_SERVICE_NAME): attributes={SERVICE_NAME: GITHUB_SERVICE_NAME}