Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions docs/sources/tempo/shared/trace-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ labels:
- oss
---

[//]: # 'This file explains trace structure.'
[//]: # 'This shared file is included in these locations:'
[//]: # '/grafana/docs/sources/datasources/tempo/traceql/trace-structure.md'
[//]: # '/grafana/docs/sources/datasources/tempo/introduction/trace-structure.md'
[//]: # '/explore-profiles/docs/concepts/trace-structure.md'
[//]: # '/website/docs/grafana-cloud/send-data/traces/trace-structure.md'
[//]: # "This file explains trace structure."
[//]: # "This shared file is included in these locations:"
[//]: # "/grafana/docs/sources/datasources/tempo/traceql/trace-structure.md"
[//]: # "/grafana/docs/sources/datasources/tempo/introduction/trace-structure.md"
[//]: # "/explore-profiles/docs/concepts/trace-structure.md"
[//]: # "/website/docs/grafana-cloud/send-data/traces/trace-structure.md"
[//]: #
[//]: # 'If you make changes to this file, verify that the meaning and content are not changed in any place where the file is included.'
[//]: # 'Any links should be fully qualified and not relative.'
[//]: # "If you make changes to this file, verify that the meaning and content are not changed in any place where the file is included."
[//]: # "Any links should be fully qualified and not relative."

<!-- Trace structure -->

Expand All @@ -33,24 +33,26 @@ In the specific context of Tempo and [TraceQL query language](https://grafana.co
- **kind**: enum: `{server, client, producer, consumer, internal, unspecified}`. For more details, refer to [OTel span kind](https://opentelemetry.io/docs/concepts/signals/traces/#span-kind) documentation.
- Attributes

The first four properties are *intrinsics*.
They are fundamental to the span.
The first four properties are _intrinsics_.
Intrinsics are the core, built-in fields that are fundamental to the identity and lifecycle of spans and traces.
These fields are defined by the OpenTelemetry specification and are always present.
They describe the essential structure of distributed tracing data.

*Attributes* are custom span metadata in the form of key-value pairs.
_Attributes_ are custom span metadata in the form of key-value pairs.
There are four types of attributes: span attributes, resource attributes, event attributes, and link attributes.

*Span attributes* are key-value pairs that contain metadata that you can use to annotate a span to carry information about the operation it's tracking.
_Span attributes_ are key-value pairs that contain metadata that you can use to annotate a span to carry information about the operation it's tracking.
For example, in an eCommerce application, if a span tracks an operation that adds an item to a user’s shopping cart, the user ID, added item ID and cart ID can be captured and attached to the span as span attributes.

A *resource attribute* represents information about an entity producing the span.
A _resource attribute_ represents information about an entity producing the span.
For example, a span created by a process running in a container deployed by Kubernetes could link a resource that specifies the cluster name, namespace, pod, and container name.
Resource attributes are resource-related metadata (key-value pairs) that are describing the Resource.

An *event attribute* represents a unique point in the time during the span's duration. For more information, refer to [All about span events](https://grafana.com/blog/2024/08/15/all-about-span-events-what-they-are-and-how-to-query-them/#how-to-query-span-events-with-traceql) and [Span events](https://opentelemetry.io/docs/concepts/signals/traces/#span-events) in the OTEL documentation.
An _event attribute_ represents a unique point in the time during the span's duration. For more information, refer to [All about span events](https://grafana.com/blog/2024/08/15/all-about-span-events-what-they-are-and-how-to-query-them/#how-to-query-span-events-with-traceql) and [Span events](https://opentelemetry.io/docs/concepts/signals/traces/#span-events) in the OTEL documentation.

A *link attribute* lets you query link data in a span.
A _link attribute_ lets you query link data in a span.
A span link associates one span with one or more other spans that are a causal relationship. For more information on span links, refer to the [Span Links](https://opentelemetry.io/docs/concepts/signals/traces/#span-links) documentation in the Open Telemetry project.

The OpenTelemetry specification defines Semantic Attributes for Spans and for Resources.
Semantic Span Attributes are a set of naming schemes for attributes shared across languages, frameworks, and runtimes.
For more details, refer to [Trace Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/general/trace/) and [Resource Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/resource/).
For more details, refer to [Trace Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/general/trace/) and [Resource Semantic Conventions](https://opentelemetry.io/docs/specs/semconv/resource/).
4 changes: 2 additions & 2 deletions docs/sources/tempo/traceql/trace-structure.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Learn about Trace structure and TraceQL
title: Learn about trace structure and TraceQL
menuTitle: Learn about trace structure and TraceQL
description: Learn about trace structure and TraceQL queries.
weight: 250
Expand All @@ -8,7 +8,7 @@ keywords:
- TraceQL
---

# Learn aboutTrace structure and TraceQL
# Learn about trace structure and TraceQL

[//]: # "Shared content for best practices for traces"
[//]: # "This content is located in /tempo/docs/sources/shared/trace-structure.md"
Expand Down
Loading