From 637be08ba63092b9be61f07d687ac1aafaff3cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=81=A7?= Date: Fri, 3 Nov 2023 15:46:18 +0100 Subject: [PATCH] Minor fixes --- Tiltfile | 1 + examples/django_example/django_example/settings.py | 3 +-- examples/export_metrics/otel-prometheus.py | 2 +- examples/export_metrics/otlp-http.py | 2 +- examples/export_metrics/otlp.py | 2 +- examples/export_metrics/prometheus-client.py | 2 +- examples/fastapi-example.py | 2 +- examples/starlette-otel-exemplars.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Tiltfile b/Tiltfile index a3b93a7..1979744 100644 --- a/Tiltfile +++ b/Tiltfile @@ -6,4 +6,5 @@ dc_resource('otel-collector', labels=["infra"]) dc_resource('push-gateway', labels=["infra"]) dc_resource('django', labels=["examples"]) dc_resource('fastapi', labels=["examples"]) +dc_resource('otlp', labels=["examples"]) dc_resource('starlette', labels=["examples"]) \ No newline at end of file diff --git a/examples/django_example/django_example/settings.py b/examples/django_example/django_example/settings.py index cdad66f..5bae0b1 100644 --- a/examples/django_example/django_example/settings.py +++ b/examples/django_example/django_example/settings.py @@ -17,8 +17,7 @@ branch="main", commit="67a1b3a", version="0.1.0", - tracker="prometheus", - service_name="django-example", + service_name="django", ) # Build paths inside the project like this: BASE_DIR / 'subdir'. diff --git a/examples/export_metrics/otel-prometheus.py b/examples/export_metrics/otel-prometheus.py index 6ad2fd8..daa263a 100644 --- a/examples/export_metrics/otel-prometheus.py +++ b/examples/export_metrics/otel-prometheus.py @@ -13,7 +13,7 @@ "type": "prometheus", "port": 9464, }, - service_name="my-service", + service_name="prom-exporter", ) diff --git a/examples/export_metrics/otlp-http.py b/examples/export_metrics/otlp-http.py index f5ab00c..bacc835 100644 --- a/examples/export_metrics/otlp-http.py +++ b/examples/export_metrics/otlp-http.py @@ -12,7 +12,7 @@ "type": "otlp-proto-http", "push_interval": 1000, }, - service_name="my-service", + service_name="otlp-exporter", ) diff --git a/examples/export_metrics/otlp.py b/examples/export_metrics/otlp.py index a5df0c1..fd1e14d 100644 --- a/examples/export_metrics/otlp.py +++ b/examples/export_metrics/otlp.py @@ -12,7 +12,7 @@ "type": "otlp-proto-grpc", "push_interval": 1000, }, - service_name="my-service", + service_name="otlp-exporter", ) diff --git a/examples/export_metrics/prometheus-client.py b/examples/export_metrics/prometheus-client.py index a023f80..084e472 100644 --- a/examples/export_metrics/prometheus-client.py +++ b/examples/export_metrics/prometheus-client.py @@ -13,7 +13,7 @@ "type": "prometheus", "port": 9464, }, - service_name="my-service", + service_name="prom-exporter", ) diff --git a/examples/fastapi-example.py b/examples/fastapi-example.py index 7ad978c..b91fd6e 100644 --- a/examples/fastapi-example.py +++ b/examples/fastapi-example.py @@ -86,7 +86,7 @@ def get_pretty_flower(flower_name: str): return f"A {flower_name} is pretty" -init(service_name="fastapi-example") +init(service_name="fastapi") if __name__ == "__main__": diff --git a/examples/starlette-otel-exemplars.py b/examples/starlette-otel-exemplars.py index d32ae4e..5d355c8 100644 --- a/examples/starlette-otel-exemplars.py +++ b/examples/starlette-otel-exemplars.py @@ -24,7 +24,7 @@ # Exemplars support requires some additional configuration on autometrics, # so we need to initialize it with the proper settings -init(tracker="prometheus", enable_exemplars=True, service_name="starlette-example") +init(tracker="prometheus", enable_exemplars=True, service_name="starlette") # We need to add tracer decorator before autometrics so that we see the spans