Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Add section on how to add attributes to spans #699

Open
@pjanotti

Description

@pjanotti

We are missing information on how to add attributes to spans. The issue was prompted by this discussion on gitter:

Nick Chappell @nickchappell 12:12
is it a known bug or issue that span attributes show up as "logs" in the Jaeger UI and not as tags?
(using the OC Go library)

Paulo Janotti @pjanotti 14:24
@nickchappell TimedEvents (Annotations and MessageEvent) will show as logs, but, Attributes should show as tags.

Nick Chappell @nickchappell 16:30
@pjanotti googling those terms, they come up for the OC Java library, but there's nothing in the Go lib for them
my code is following the example on https://opencensus.io/tracing/span/time_events/annotation/#0

Paulo Janotti @pjanotti 16:54
@nickchappell the code is here https://github.com/census-ecosystem/opencensus-go-exporter-jaeger/blob/master/jaeger.go#L203 the link that you sent indicates that an annotation, which is a time event and as such goes as log. Use https://github.com/census-instrumentation/opencensus-go/blob/f6172e422374225c6748bd2a9c872e88c2eb43d4/trace/trace.go#L401
Of course there is a gap in the docs…

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