Skip to content

Commit

Permalink
Merge pull request #91 from meedan/cv2-4725-update-timeout
Browse files Browse the repository at this point in the history
CV2-4725 decrease timeout on telemetry pings from 60s to 10s
  • Loading branch information
DGaffney committed Jun 10, 2024
2 parents e958af1 + 9996ca7 commit af00d9e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(self, service_name: str, local_debug=False) -> None:
# write metrics to console instead of sending them
reader = PeriodicExportingMetricReader(
ConsoleMetricExporter(),
export_interval_millis=int(os.getenv("METRICS_REPORTING_INTERVAL", "60000")),
export_interval_millis=int(os.getenv("METRICS_REPORTING_INTERVAL", "10000")),
)
meter_provider = MeterProvider(resource=resource, metric_readers=[reader])
else:
Expand All @@ -50,7 +50,7 @@ def __init__(self, service_name: str, local_debug=False) -> None:
"X-Honeycomb-Dataset": honeycomb_dataset,
},
),
export_interval_millis=int(os.getenv("METRICS_REPORTING_INTERVAL", "60000")),
export_interval_millis=int(os.getenv("METRICS_REPORTING_INTERVAL", "10000")),
)
meter_provider = MeterProvider(resource=resource, metric_readers=[reader])
metrics.set_meter_provider(meter_provider)
Expand Down
2 changes: 1 addition & 1 deletion test/lib/test_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
def set_env_vars():
os.environ['HONEYCOMB_API_KEY'] = 'test_api_key'
os.environ['HONEYCOMB_DATASET'] = 'test_dataset'
os.environ['METRICS_REPORTING_INTERVAL'] = '60000'
os.environ['METRICS_REPORTING_INTERVAL'] = '10000'
os.environ['HONEYCOMB_API_ENDPOINT'] = 'https://api.honeycomb.io'
os.environ['DEPLOY_ENV'] = 'test_env'
yield
Expand Down

0 comments on commit af00d9e

Please sign in to comment.