这是indexloc提供的服务,不要输入任何密码
Skip to content

logging action webhook calls #4171

@tirumaraiselvan

Description

@tirumaraiselvan

When HASURA_GRAPHQL_LOG_LEVEL is set to debug, then log the request to and response from the action webhook call. The log-type of this should be action (similar to event-trigger log-type for event trigger responses). So it will look like (similar to event trigger logs)

{
"type":"action",
"timestamp":"2020-03-18T06:20:35.373+0000",
"level":"debug",
"detail":{
  "context":{"action_id":"5d8a8bed-024c-40ca-9521-287c330f83c2"},  # any kind of context (for e.g.  action_id for async actions)
  "request":{"url": "", "body":"{}", "headers": []},
  "response":{"status":200,"body":"{}", "headers": []}
  }
}

Note on logging headers:

  • Request headers should be redacted based on whether the value is environment variable and should be over-rideable using LOG_HEADERS_FROM_ENV env flag. This infra already exists for Event Triggers -- see

    logEnvHeaders <- liftIO $ getFromEnv False "LOG_HEADERS_FROM_ENV"
    and

  • Header Authorization should be redacted.

  • Redacting response headers will be outside the scope of this spec. We can also choose to not log response headers till we spec this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c/actionsRelated to actionsc/serverRelated to serverk/enhancementNew feature or improve an existing featurep/highcandidate for being included in the upcoming sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions