Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: add configuration to for changing service name on OpenTelemet…
…ry (#1371) Currently, the OpenTelemetry service name for svix-server is hardcoded to "svix_server". This lack of configurability limits the flexibility for users who want to customize the service name in their OpenTelemetry setup, especially in environments where multiple services are being monitored, like having several servers in "worker mode". This change aims to provide users with the ability to set a custom OpenTelemetry service name, for better integration with their existing monitoring, observability infrastructure or naming convention. The solution implements a configurable OpenTelemetry service name for svix-server: 1. Added a new configuration option `opentelemetry_service_name` in the `ConfigurationInner` struct. 2. Updated the default configuration file (`config.default.toml`) to include the new option with a comment explaining its usage. 3. Modified the `setup_tracing` function to use the configured service name when setting up OpenTelemetry. Users can set a custom OpenTelemetry service name through configuration files or environment variables (e.g., `SVIX_OPENTELEMETRY_SERVICE_NAME`). If not specified, it defaults to "svix_server" to maintain backward compatibility.
- Loading branch information