Skip to content

Invalid detection of response status in executeRequestAndUpdateMetrics #599

@Tomasz-Smelcerz-SAP

Description

@Tomasz-Smelcerz-SAP

There are some problems in executeRequestAndUpdateMetrics function (pkg/event/skr_events_listener.go)

  1. The response code detection is invalid. request.Response is NOT related to the HttpServer response: It is valid for a Response received from remote server when using HTTP Client to send a request.
  2. The metrics.RecordHTTPInflightRequests increase/decrease seems to be wrongly placed. It should "wrap" the call to next.ServeHTTP(), but it does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions