Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
drewby committed Jan 10, 2025
1 parent b77a4dc commit 1e0d6b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@


class OpenAIInstrumentor(BaseInstrumentor):
def __init__(self):
self._meter = None

def instrumentation_dependencies(self) -> Collection[str]:
return _instruments

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def fixture_event_logger_provider(log_exporter):

@pytest.fixture(scope="function", name="meter_provider")
def fixture_meter_provider(metric_reader):
TokenUsageHistogramView = View(
token_usage_histogram_view = View(
instrument_type=Histogram,
instrument_name="gen_ai.client.token.usage",
aggregation=ExplicitBucketHistogramAggregation(
Expand All @@ -94,7 +94,7 @@ def fixture_meter_provider(metric_reader):
),
)

DurationHistogramView = View(
duration_histogram_view = View(
instrument_type=Histogram,
instrument_name="gen_ai.client.operation.duration",
aggregation=ExplicitBucketHistogramAggregation(
Expand All @@ -119,7 +119,7 @@ def fixture_meter_provider(metric_reader):

meter_provider = MeterProvider(
metric_readers=[metric_reader],
views=[TokenUsageHistogramView, DurationHistogramView],
views=[token_usage_histogram_view, duration_histogram_view],
)

return meter_provider
Expand Down

0 comments on commit 1e0d6b7

Please sign in to comment.