Support overriding the diagnostics service name - #55
Merged
z4kn4fein merged 1 commit intoJul 1, 2026
Conversation
tostavio
force-pushed
the
support-overriding-service-name
branch
from
July 1, 2026 00:45
a6b2003 to
c770762
Compare
z4kn4fein
approved these changes
Jul 1, 2026
Member
|
Hi @tostavio, thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request lets each ConfigCat Proxy deployment configure the OpenTelemetry service name used for diagnostics telemetry.
Motivation
Multiple ConfigCat Proxy deployments can run in the same Kubernetes cluster or observability environment. A fixed service name makes their OTLP metrics and traces appear under the same
service.nameresource attribute, which makes monitoring and filtering ambiguous.This setting lets operators assign a distinct service name per deployment, for example when different proxies serve different environments, tenants, network zones, or traffic paths.
Fix
The key behavior change is in the telemetry reporter. The reporter now builds the OpenTelemetry resource from the configured diagnostics service name instead of always writing the fixed value:
The YAML and environment configuration changes only provide this value through the existing diagnostics configuration path.
Changes
diag.service_nameto the YAML configuration.CONFIGCAT_DIAG_SERVICE_NAMEas the matching environment override.service.nameresource attribute.Compatibility
When no service name is configured, ConfigCat Proxy keeps using
configcat-proxy.Testing
go fmt ./...go vet -tags testing ./...go test -tags testing -race ./config -run TestDiagConfiggo test -tags testing -race ./diag/telemetry -run TestBuildResource_ServiceNameCloses #54.