Skip to content

feat: configurable service name - #111

Merged
franklinkim merged 3 commits into
v3from
feature/configurable-service-name
Aug 4, 2026
Merged

feat: configurable service name#111
franklinkim merged 3 commits into
v3from
feature/configurable-service-name

Conversation

@franklinkim

Copy link
Copy Markdown
Member

Description

Add a serviceNames target option to override the display name used for OTel spans and metrics per service.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactoring
  • ⚡ Performance
  • ✅ Tests
  • 🔧 Build/CI

Changes

  • Add serviceNames map[string]string to config.Target plus a Target.ServiceName(service) helper that falls back to the service name when no override is set (does not affect generated Go types or routing).
  • Wire config.ServiceName(...) into renderTSRPCServiceProxies, renderTSRPCServiceClients, renderGoRPCServiceProxies, and renderGoRPCServiceClients so the telemetry name flows into NewServer / WithClientService.
  • Extend gotsrpc.schema.json and gotsrpc.example.yaml with the new serviceNames property; document it in docs/guide/configuration.md.
  • Harden updateCode in build.go: propagate the os.ReadFile error instead of ignoring it, tighten MkdirAll perms to 0700, and drop the //nolint:gosec suppressions.
  • Clarify semconv.Config field docs for the client-side Package/Service usage.
  • Regenerate the monitor example with serviceNames: { Service: Monitor }.

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.

@franklinkim
franklinkim merged commit 91dc2f6 into v3 Aug 4, 2026
1 check passed
@franklinkim
franklinkim deleted the feature/configurable-service-name branch August 4, 2026 15:21
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.

1 participant