Skip to content

Add telemetry logging health check#2268

Open
rafaelwestphal wants to merge 15 commits intomasterfrom
westphalrafael/add-telemetry-logs-check
Open

Add telemetry logging health check#2268
rafaelwestphal wants to merge 15 commits intomasterfrom
westphalrafael/add-telemetry-logs-check

Conversation

@rafaelwestphal
Copy link
Copy Markdown
Contributor

@rafaelwestphal rafaelwestphal commented Apr 14, 2026

Description

Adding a telemetry logging endpoint healthcheck for Ops Agent.

Related issue

b/437088366

How has this been tested?

Manual tested in VMs

  1. Success Case (All permissions and scopes granted)
    VM: telemetry-test-vm-logs-test
2026/04/14 17:54:18 [Ports Check] Result: PASS
2026/04/14 17:54:18 [Network Check] Result: PASS
{"level":"info","ts":1776189258.1784217,"caller":"logs/logs.go:120","msg":"[API Check] Result: PASS"}
2026/04/14 17:54:18 [API Check] Result: PASS
2026/04/14 17:54:18 Startup checks finished
  1. Missing Scope Case (Missing logging.write scope)
    VM: telemetry-test-vm-no-scope-logs
2026/04/14 17:55:43 [Ports Check] Result: PASS
2026/04/14 17:55:43 [Network Check] Result: PASS
2026/04/14 17:55:43 [API Check] Result: FAIL, Error code: LogApiScopeErr, Failure: VM is missing the https://www.googleapis.com/auth/logging.write scope., Solution: Add the https://www.googleapis.com/auth/logging.write scope to the Compute Engine VM., Resource: https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/authorization
2026/04/14 17:55:43 Startup checks finished
  1. Permission Denied Case (Missing IAM permission)
    VM: telemetry-test-vm-no-perm
2026/04/14 17:57:12 [Ports Check] Result: PASS
2026/04/14 17:57:12 [Network Check] Result: PASS
2026/04/14 17:57:12 [API Check] Result: ERROR, Detail: rpc error: code = InvalidArgument desc = Request contains an invalid argument.
2026/04/14 17:57:12 Startup checks finished

(Note: The InvalidArgument error is tracked by bug b/502341191 as it should ideally be a permission error).

  1. API Disabled Case (Telemetry API disabled in project)
    VM: telemetry-test-vm-logs-test
2026/04/14 18:00:55 [Ports Check] Result: PASS
2026/04/14 18:00:55 [Network Check] Result: PASS
2026/04/14 18:00:55 [API Check] Result: FAIL, Error code: TelApiDisabledErr, Failure: The Telemetry API is disabled or not accessible in the current Google Cloud project., Solution: Verify that telemetry.googleapis.com is enabled in your Google Cloud project., Resource: https://docs.cloud.google.com/stackdriver/docs/reference/api-overview
2026/04/14 18:00:55 Startup checks finished

Checklist:

  • Unit tests
    • [] Unit tests do not apply.
    • Unit tests have been added/modified and passed for this PR.
  • Integration tests
    • Integration tests do not apply.
    • Integration tests have been added/modified and passed for this PR.
  • Documentation
    • This PR introduces no user visible changes.
    • This PR introduces user visible changes and the corresponding documentation change has been made.
  • Minor version bump
    • This PR introduces no new features.
    • This PR introduces new features, and there is a separate PR to bump the minor version since the last release already.
    • This PR bumps the version.

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