Skip to content

Commit

Permalink
fix: support custom exporters (#235)
Browse files Browse the repository at this point in the history
Custom exporters are failing to load due to `capitalize`. This PR propagates the `get_backend()` logic to `get_exporters()`.
  • Loading branch information
pradeepbbl authored and lvaylet committed Nov 25, 2022
1 parent 9baa33e commit b045eb9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions slo_generator/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,11 @@ def get_exporters(config, spec):
continue
exporter_data = all_exporters[exporter]
exporter_data['name'] = exporter
exporter_data['class'] = capitalize(
snake_to_caml(exporter.split('/')[0]))
if '.' in exporter: # support custom exporter
exporter_data['class'] = exporter
else: # core exporter
exporter_data['class'] = capitalize(
snake_to_caml(exporter.split('/')[0]))
exporters.append(exporter_data)
return exporters

Expand Down

0 comments on commit b045eb9

Please sign in to comment.