Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for data-plane services to surface diagnostics to the control-plane #236

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

doylemark
Copy link
Contributor

@doylemark doylemark commented Aug 28, 2024

Why

This PR defines new traits that enable collection of diagnostics from various services within the data-plane.
By implementing the Diagnosable trait, a service can report aribtary JSON diagnostics to the control-plane which are then logged.

These diagnostics are surfaced by the data-plane to the control-plane, when the control-plane requests a healthcheck. Although they are surfaced alongside the healthcheck, they are not considered part of the healthcheck itself.
The is_healthy method which is used to describe the health of the enclave to ECS, currently only considers the status of the user process.

In the future more services can surface diagnostics using this implementation, at that point it may be useful to consider certain diagnostics as part of the healthcheck.

How

Diagnostics will be surface to the control-plane as serialized JSON.

{
  "controlPlane": "Ok",
  "dataPlane": {
    "Initialized": {
      "user_process": {
        "Initialized": {
          "Response": {
            "status_code": 200
            "body": { "status": "happy" }
          }
        }
      },
      "diagnostics": [
        {
            "label": "E3Client",
            "data": {
              ...payloadOfDiagnostic,
              // eg
              "decryption_err": "...."
            }
        }
      ]
    }
  }
}

@doylemark doylemark changed the title diagnostics Add ability for data-plane services to surface diagnostics to the control-plane Aug 30, 2024
@doylemark doylemark marked this pull request as ready for review August 30, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant