Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
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
5 changes: 4 additions & 1 deletion docs/upgrade-guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ receiving all spans for a trace in the same agent to be processed, such as
service graphs.

As a consequence, `tail_sampling.load_balancing` has been deprecated in favor of
a `load_balancing` block.
a `load_balancing` block. Also, `port` has been renamed to `receiver_port` and
moved to the new `load_balancing` block.

Example old config:

```yaml
tail_sampling:
policies:
- always_sample:
port: 4318
load_balancing:
exporter:
insecure: true
Expand All @@ -51,6 +53,7 @@ load_balancing:
dns:
hostname: agent
port: 4318
receiver_port: 4318
```

### Operator: Rename of Prometheus to Metrics (Breaking change)
Expand Down
13 changes: 7 additions & 6 deletions pkg/tempo/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,15 +222,15 @@ type tailSamplingConfig struct {
Policies []map[string]interface{} `yaml:"policies"`
// DecisionWait defines the time to wait for a complete trace before making a decision
DecisionWait time.Duration `yaml:"decision_wait,omitempty"`
// Port is the port the instance will use to receive load balanced traces
Port string `yaml:"port"`
}

// loadBalancingConfig defines the configuration for load balancing spans between agent instances
// loadBalancingConfig is an OTel exporter's config with extra resolver config
type loadBalancingConfig struct {
Exporter exporterConfig `yaml:"exporter"`
Resolver map[string]interface{} `yaml:"resolver"`
// ReceiverPort is the port the instance will use to receive load balanced traces
ReceiverPort string `yaml:"receiver_port"`
}

// exporterConfig defined the config for a otlp exporter for load balancing
Expand Down Expand Up @@ -544,8 +544,8 @@ func (c *InstanceConfig) otelConfig() (*config.Config, error) {
exporters["loadbalancing"] = internalExporter

receiverPort := defaultLoadBalancingPort
if c.TailSampling.Port != "" {
receiverPort = c.TailSampling.Port
if c.LoadBalancing.ReceiverPort != "" {
receiverPort = c.LoadBalancing.ReceiverPort
}
c.Receivers["otlp/lb"] = map[string]interface{}{
"protocols": map[string]interface{}{
Expand All @@ -557,7 +557,7 @@ func (c *InstanceConfig) otelConfig() (*config.Config, error) {
}

// Build Pipelines
splitPipeline := c.TailSampling != nil && c.LoadBalancing != nil
splitPipeline := c.LoadBalancing != nil
orderedSplitProcessors := orderProcessors(processorNames, splitPipeline)
if splitPipeline {
// load balancing pipeline
Expand Down Expand Up @@ -690,7 +690,8 @@ func orderProcessors(processors []string, splitPipelines bool) [][]string {
foundAt := len(processors)
for i, processor := range processors {
if processor == "batch" ||
processor == "tail_sampling" {
processor == "tail_sampling" ||
processor == "automatic_logging" {
foundAt = i
break
}
Expand Down
55 changes: 52 additions & 3 deletions pkg/tempo/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,12 +607,13 @@ tail_sampling:
- value1
- value2
load_balancing:
receiver_port: 8080
exporter:
insecure: true
resolver:
dns:
hostname: agent
port: 4318
port: 8080
`,
expectedConfig: `
receivers:
Expand All @@ -622,7 +623,7 @@ receivers:
otlp/lb:
protocols:
grpc:
endpoint: "0.0.0.0:4318"
endpoint: "0.0.0.0:8080"
exporters:
otlp/0:
endpoint: example.com:12345
Expand All @@ -639,7 +640,7 @@ exporters:
resolver:
dns:
hostname: agent
port: 4318
port: 8080
processors:
tail_sampling:
decision_wait: 5s
Expand Down Expand Up @@ -940,6 +941,54 @@ load_balancing:
"metrics/spanmetrics": nil,
},
},
{
name: "load balancing without tail sampling",
cfg: `
receivers:
jaeger:
protocols:
grpc:
remote_write:
- endpoint: example.com:12345
headers:
x-some-header: Some value!
attributes:
actions:
- key: montgomery
value: forever
action: update
spanmetrics:
latency_histogram_buckets: [2ms, 6ms, 10ms, 100ms, 250ms]
dimensions:
- name: http.method
default: GET
- name: http.status_code
prom_instance: tempo
automatic_logging:
spans: true
batch:
timeout: 5s
send_batch_size: 100
load_balancing:
exporter:
insecure: true
resolver:
dns:
hostname: agent
port: 4318
`,
expectedProcessors: map[string][]config.ComponentID{
"traces/0": {
config.NewID("attributes"),
config.NewID("spanmetrics"),
},
"traces/1": {
config.NewID("automatic_logging"),
config.NewID("batch"),
},
"metrics/spanmetrics": nil,
},
},
}

for _, tc := range tt {
Expand Down