Skip to content

#[instrument(fields(...))] does not support dotted field names #1210

@nikclayton-dfinity

Description

@nikclayton-dfinity

Bug Report

Version

tracing-attributes v0.1.8

Platform

Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64 i386 MacBookPro15,1 Darwin

Description

I want to set otel.kind in a function instrumented using #[instrument].

Reading the docs I figured

#[instrument(fields(otel.kind="server"))]

would do it, but that results in:

error: expected `,`
   --> redacted/mod.rs:168:41
    |
168 | #[instrument(fields(otel.kind="server"))]
                                   ^

You get the same error if otel.kind is quoted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions