Skip to content

Are nested fields no more supported in instrumentation? #3458

@dibericky

Description

@dibericky

In the latest version of the doc is said:

Note that nested (dotted) field names are also supported.

And there is an example:

#[instrument(fields(http.uri = req.uri(), http.method = req.method()))]
pub fn handle_request<B>(req: http::Request<B>) -> http::Response<B> {
    // ... handle the request ...
}

In the pre-release documentation instead:

The name of the field must be a single valid Rust identifier, nested (dotted) field names are not supported.

Are nested fields so no longer supported? If so, what's the new idiomatic way to have nested structure in span fields via instrumentation?

For instance the example above how shall be written with the next release of the library?

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