Skip to content

Use app as the default service name - #1581

Merged
unflxw merged 1 commit into
mainfrom
default-service-name-app
Aug 25, 2026
Merged

Use app as the default service name#1581
unflxw merged 1 commit into
mainfrom
default-service-name-app

Conversation

@unflxw

@unflxw unflxw commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

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.

@backlog-helper

Copy link
Copy Markdown

Hi @unflxw,

We've found some issues with your Pull Request.

  • This Pull Request is missing labels. Please add labels to help identify types of Pull Requests. - (More info)

New issue guide | Backlog management | Rules | Feedback

@unflxw

unflxw commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

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.

@unflxw
unflxw force-pushed the default-service-name-app branch from af673ba to 958889f Compare August 21, 2026 14:53
@unflxw unflxw changed the title Default the service name to app Use app as the default service name Aug 21, 2026
@unflxw
unflxw requested review from lipskis and a lite review from Copilot August 25, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.name fallback from "unknown" to "app" in Appsignal::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.

Comment thread lib/appsignal/opentelemetry.rb Outdated
@unflxw

unflxw commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Now that collector mode has been released in 5.0.0.rc1, this should have a changeset so that .rc2 can explain the change. The one from the Python twin PR would do nicely.

@unflxw
unflxw marked this pull request as ready for review August 25, 2026 13:00
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.
@unflxw
unflxw force-pushed the default-service-name-app branch from 958889f to aa60016 Compare August 25, 2026 13:08
@unflxw

unflxw commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Added the changeset, copied from the Python twin PR. Rebased onto main so it lands on top of the 5.0.0.rc.1 release, and dropped the paragraph about there being no changeset from the commit message and the description.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@unflxw
unflxw merged commit 7078181 into main Aug 25, 2026
433 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants