Skip to content

Commit

Permalink
fix: Use iterable for Aggregation preference
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGoodall committed Nov 1, 2024
1 parent 92cc109 commit 2e69878
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/otel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 2e69878

Please sign in to comment.