fix(otel): report API APM service as shopmon-api - #797
Draft
shyim wants to merge 1 commit into
Draft
Conversation
Align the HTTP server with the worker's process suffix pattern so OTEL_SERVICE_NAME stays a shared base (shopmon) while the API reports as shopmon-api and the worker remains shopmon-worker. Co-authored-by: Soner <github@shyim.de>
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
The HTTP API currently reports OpenTelemetry/Datadog APM spans under service
shopmon, while the worker already usesshopmon-worker. Ops/docs commonly expect the API asshopmon-api.This change makes the API append
-apito the shared baseOTEL_SERVICE_NAME, matching the worker’s existing-workersuffix. Server and worker already share one ConfigMap/env in-repo (k8s/preview), so treatingOTEL_SERVICE_NAMEas a base name (defaultshopmon) is the least surprising approach:shopmon server)shopmonshopmon-apishopmon worker)shopmon-workershopmon-worker(unchanged)OTEL_SERVICE_NAMEremains the override lever for the base; docs in.env.exampleandSELF_HOSTING.mdspell out the suffixes.Why not change the env default to
shopmon-api?Setting
OTEL_SERVICE_NAME=shopmon-apiwhile the worker still doesbase + "-worker"would produceshopmon-api-worker. In-repo deploy manifests do not set a dedicated API-only service name.Datadog migration note
This creates a new APM service (
shopmon-api). Existing dashboards/monitors keyed onservice:shopmonwill stop seeing API traffic until updated.Confirmed in Datadog today:
shopmon,shopmon-worker(noshopmon-apiyet)service:shopmonfor HTTP metrics and list template valuesshopmon/shopmon-workershopmonmonitors found via search are synthetics/infra, not APMservice:shopmonqueries — still re-check any saved views/notebooksBefore/after deploy checklist
service:shopmon→service:shopmon-api(worker staysservice:shopmon-worker)service:(shopmon OR shopmon-api)) during rolloutshopmonservice referencesIn-repo
service:shopmongrepNo in-repo hits for
service:shopmon(monitors/dashboards live in Datadog, not this repo).Test plan
OTEL_SERVICE_NAME=shopmonmise run lintmise run test