Use app as the default service name - #1581
Conversation
|
Rationale for this (and for consistency, its twin Python PR at appsignal/appsignal-python#270) is to have the same name for customers who upgrade from agent mode to collector mode. @matsimitsu will be changing the processor's translation layer to use "app" as well, so we have a shared, reasonable enough default. Docs will still advise setting a service name as part of collector mode setup, so the fallback may not be very relevant, but customers who upgrade somewhat manually may skip the docs. |
af673ba to
958889f
Compare
appapp as the default service name
There was a problem hiding this comment.
Pull request overview
Updates AppSignal鈥檚 OpenTelemetry resource construction to use a more meaningful default service name in collector mode, so traces/logs from apps that don鈥檛 explicitly set service_name are grouped under app instead of unknown.
Changes:
- Change the default
service.namefallback from"unknown"to"app"inAppsignal::OpenTelemetry.build_resource. - Update the corresponding spec expectations and wording to reflect the new default behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/appsignal/opentelemetry.rb | Adjusts service.name fallback to "app" when service_name is empty/nil. |
| spec/lib/appsignal/opentelemetry_spec.rb | Updates test description and assertion for the new service.name fallback value. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Now that collector mode has been released in |
The collector turns the service name into names that customers see. A
trace's namespace becomes `{service name}/{namespace}`, so a web
request from an app that does not set `service_name` was filed under
`unknown/web`. A log line's group falls back to the service name on
its own, so those lines were grouped under `unknown`.
Leaving `service_name` unset is the normal case for an app that is a
single service. Nothing about it is actually unknown, so the fallback
now describes what it is. The `revision` and `hostname` fallbacks
still report `unknown`, because those are facts about the running
process that AppSignal really does not have.
958889f to
aa60016
Compare
|
Added the changeset, copied from the Python twin PR. Rebased onto |
The collector turns the service name into names that customers see. A
trace's namespace becomes
{service name}/{namespace}, so a webrequest from an app that does not set
service_namewas filed underunknown/web. A log line's group falls back to the service name onits own, so those lines were grouped under
unknown.Leaving
service_nameunset is the normal case for an app that is asingle service. Nothing about it is actually unknown, so the fallback
now describes what it is. The
revisionandhostnamefallbacksstill report
unknown, because those are facts about the runningprocess that AppSignal really does not have.