Twirp v0.4.1 Twirp.Telemetry View Source

Provides telemetry for twirp clients and servers

Twirp executes the following events:

  • [:twirp, :rpc, :start] - Executed before making an rpc call to another service.

    Measurements

    • :system_time - The system time

    Metadata

    • :client - The client module issuing the call.
    • :method - The RPC method
    • :service - The url for the service
  • [:twirp, :rpc, :stop] - Executed after a connection is retrieved from the pool.

    Measurements

    • :duration - Duration to send an rpc to a service and wait for a response.

    Metadata

    • :client - The client module issuing the call.
    • :method - The RPC method
    • :service - The url for the service
    • :error - Optional key. If the call resulted in an error this key will be present along with the Twirp Error.
  • [:twirp, :call, :start] - Executed before the twirp handler is called

    Measurements

    • :system_time - The system time

    Metadata

    There is no metadata for this event.

  • [:twirp, :call, :stop] - Executed after twirp handler has been executed.

    Measurements

    • :duration - Duration to handle the rpc call.

    Metadata

    • :content_type - The content type being used, either proto or json.
    • :method - The name of the method being executed.
    • :error - Optional key. If the call resulted in an error this key will be present along with the Twirp Error.
  • [:twirp, :call, :exception] - Executed if the twirp handler raises an exception

    Measurements

    • :duration - Duration to handle the rpc call.

    Metadata

    • :kind - The kind of error that was raised.
    • :error - The exception
    • :stacktrace - The stacktrace