diff --git a/CHANGELOG.md b/CHANGELOG.md index d3d801e..fc7f1d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ [Unreleased]: https://github.com/chaostoolkit-incubator/chaostoolkit-opentracing/compare/0.11.0...HEAD +### Changed + +- Respect `OTEL_SERVICE_NAME` when set + ## [0.11.0][] - 2023-08-02 [0.11.0]: https://github.com/chaostoolkit-incubator/chaostoolkit-opentracing/compare/0.10.0...0.11.0 diff --git a/chaostracing/oltp.py b/chaostracing/oltp.py index 12ea091..46db0b1 100644 --- a/chaostracing/oltp.py +++ b/chaostracing/oltp.py @@ -362,7 +362,9 @@ def activity_completed(self, activity: Activity, state: Run) -> None: # Private functions ############################################################################### def configure_traces(configuration: Configuration) -> None: - resource = Resource.create({"service.name": "chaostoolkit"}) + resource = Resource.create( + {"service.name": os.getenv("OTEL_SERVICE_NAME", "chaostoolkit")} + ) vendor = configuration.get("otel_vendor", os.getenv("OTEL_VENDOR")) if vendor == "gcp":