requestid

package
v0.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package requestid identifies one request: the id an error body carries, and that leads to the request's log line and its trace.

It is ours and separate from the trace id, so each can be managed on its own terms; see error_handling.md §The request id. The HTTP middleware mints one per request and stores it in the context; every transport reads it from there. An MCP tool call arrives in its own POST, so it carries that POST's id.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From(ctx context.Context) string

From returns the request id ctx carries, or "" when it carries none.

func New

func New() string

New returns a fresh request id: "req_" and 128 random bits in lowercase base32.

func With

func With(ctx context.Context, id string) context.Context

With returns ctx carrying id.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL