Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
Observability.hpp File Reference
#include <orbit/legacy_namespaces.hpp>
#include <orbit/routing/Router.hpp>
#include <orbit/utils/Logger.hpp>
#include <chrono>
#include <functional>
#include <string>
Include dependency graph for Observability.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  orbit::middleware::RequestIdOptions
 Options for request_id(). More...
 
struct  orbit::middleware::Span
 A finished request, as reported to TracingOptions::on_span_end. More...
 
struct  orbit::middleware::TracingOptions
 Options for tracing(). More...
 
struct  orbit::middleware::AccessLogOptions
 Options for access_log(). More...
 

Namespaces

namespace  orbit
 
namespace  orbit::middleware
 

Functions

routing::Middleware orbit::middleware::request_id (RequestIdOptions options={})
 Gives every request an ID (req.request_id) and echoes it in the response header, so a client report can be matched to server logs.
 
routing::Middleware orbit::middleware::tracing (TracingOptions options={})
 W3C Trace Context: continues the trace from an incoming traceparent header (or starts a new one), sets req.trace_id and req.span_id, and reports each request as a Span.
 
routing::Middleware orbit::middleware::access_log (AccessLogOptions options={})
 Logs one line per request when its response is sent: method, path, status, response bytes, duration, client IP, user agent, and the request/trace IDs when request_id() / tracing() are used. In JSON log format these are separate fields.