Skip to main content

Working with Span attributes

You can add, delete, hash, or modify span attributes (metadata tags) on Collectors or directly in your application code. This helps you enhance diagnostic details included in your data, remove redundant information to cut the cost, or mask sensitive information before they leave your site.

Attach logs to spans

You can collect logs with traces attached to them by inserting spanid/traceid from span context when writing to logs. If that's not possible, you can assign any of the following fields:

  • error
  • error.kind
  • error.object
  • event
  • message
  • stack

and they are displayed in the Span logs tab in Details Pane after clicking on the span.

span logs in details pane.png

Working with attributes on OpenTelemetry collector

Regardless If you're using the Sumo Logic distribution of OpenTelemetry collector, an original installation, or the OpenTelemetry collector as part of Sumo Logic Kubernetes collection, you can use the attributes processor to add, modify, delete, or hash the values of attributes.

Refer to the OpenTelemetry collector attributes processor documentation for examples.

Insert custom tags with instrumentation APIs

You can insert dynamically-created custom tags in your code by calling the appropriate functions of OpenTelemetry auto-instrumentation.

See how to pass custom tags for Java auto-instrumentation.

Sumo Logic YouTubeSumo Logic Twitter
Legal
Privacy Statement
Terms of Use

Copyright © 2022 by Sumo Logic, Inc.