Skip to content

feat: filter dashboards by OTEL_SERVICE_NAME#328

Merged
luis5tb merged 2 commits into
RHEcosystemAppEng:mainfrom
IlonaShishov:fix-dashboard-filter
Jul 14, 2026
Merged

feat: filter dashboards by OTEL_SERVICE_NAME#328
luis5tb merged 2 commits into
RHEcosystemAppEng:mainfrom
IlonaShishov:fix-dashboard-filter

Conversation

@IlonaShishov

@IlonaShishov IlonaShishov commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Make OTEL_SERVICE_NAME a configurable Cloud Build substitution (_OTEL_SERVICE_NAME) instead of hardcoding it in service.yaml
  • Update dashboard filters to use the job metric label (which carries OTEL_SERVICE_NAME) instead of the non-existent service_name label
  • Dashboard stringValue is substituted at deploy time via sed, so each deployment's dashboards are scoped to the correct agent
  • deploy-cloudbuild.sh falls back to SERVICE_NAME when OTEL_SERVICE_NAME is not set

Test plan

  • Verify make lint passes
  • Deploy with default _SERVICE_NAME and confirm dashboards filter by job=lightspeed-agent
  • Deploy with --substitutions=_OTEL_SERVICE_NAME=custom-name and confirm dashboards filter by job=custom-name
  • Verify deploy-cloudbuild.sh forwards OTEL_SERVICE_NAME correctly
  • Verify fallback: unset OTEL_SERVICE_NAME, set SERVICE_NAME=test-agent, confirm _OTEL_SERVICE_NAME=test-agent

🤖 Generated with Claude Code

Make OTEL_SERVICE_NAME a Cloud Build substitution instead of hardcoding
it in service.yaml, so each deployment's dashboards and metrics are
scoped to the correct agent identity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
luis5tb added a commit to luis5tb/google-lightspeed-agent that referenced this pull request Jul 14, 2026
Thread _OTEL_SERVICE_NAME through the GitOps Helm chart to support
PR RHEcosystemAppEng#328's configurable OTel service name for dashboard filtering
and metrics scoping in multi-instance deployments.

- GitOps: falls back to services.agent.name when otelServiceName
  is not explicitly set, so multi-instance deployments get unique
  OTel names automatically
- deploy.sh: add OTEL_SERVICE_NAME env var with SERVICE_NAME fallback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@luis5tb luis5tb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tested it with the extra GitOps integration and it works as expected

@luis5tb
luis5tb merged commit a5fefb5 into RHEcosystemAppEng:main Jul 14, 2026
15 checks passed
luis5tb added a commit to luis5tb/google-lightspeed-agent that referenced this pull request Jul 14, 2026
Thread _OTEL_SERVICE_NAME through the GitOps Helm chart to support
PR RHEcosystemAppEng#328's configurable OTel service name for dashboard filtering
and metrics scoping in multi-instance deployments.

- GitOps: falls back to services.agent.name when otelServiceName
  is not explicitly set, so multi-instance deployments get unique
  OTel names automatically
- deploy.sh: add OTEL_SERVICE_NAME env var with SERVICE_NAME fallback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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