Skip to content

Commit ad6fa9e

Browse files
committed
docs: update for native stats/opentelemetry migration and OpenTracing removal
- config-reference: add OTEL_USE_LEGACY_INSTRUMENTATION, ENABLE_OTEL_METRICS, OTEL_METRICS_INTERVAL env vars; update OTLP_USE_OPENTRACING_BRIDGE as removed - integrations: remove UseOpenTracingBridge from OTLPConfig struct and examples - FAQ: update OpenTracing migration answer (bridge removed) - howto/Debugging: update otelgrpc.TagRPC reference to native stats handler
1 parent ce2d122 commit ad6fa9e

4 files changed

Lines changed: 28 additions & 27 deletions

File tree

FAQ.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ See the [Tracing How-To](/howto/Tracing/#trace-id-propagation) for details.
6565

6666
## How do I migrate from OpenTracing to OpenTelemetry?
6767

68-
The `tracing` package supports both. To switch:
68+
The OpenTracing bridge has been removed. ColdBrew now uses OpenTelemetry natively:
6969

70-
1. Update your tracing initialization to use OpenTelemetry's SDK
71-
2. The `tracing.NewInternalSpan()`, `tracing.NewDatastoreSpan()`, and `tracing.NewExternalSpan()` functions work with both backends
72-
3. See the [Tracing How-To](/howto/Tracing/) and [Integrations](/integrations) guides for setup details
70+
1. Remove any direct `opentracing.GlobalTracer()` calls — use `otel.Tracer()` instead
71+
2. The `tracing.NewInternalSpan()`, `tracing.NewDatastoreSpan()`, and `tracing.NewExternalSpan()` functions use OpenTelemetry natively
72+
3. If you had `OTLP_USE_OPENTRACING_BRIDGE=true`, remove it — the setting is now ignored (a warning is logged if set)
73+
4. See the [Tracing How-To](/howto/Tracing/) and [Integrations](/integrations) guides for setup details
7374

7475
## What is vtprotobuf and why does ColdBrew use it?
7576

config-reference.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ When `OTLP_ENDPOINT` is set, it takes precedence over New Relic OpenTelemetry co
115115
| `OTLP_COMPRESSION` | string | `gzip` | Compression type: `gzip` or `none` |
116116
| `OTLP_INSECURE` | bool | `false` | Disable TLS for OTLP connection (development only) |
117117
| `OTLP_SAMPLING_RATIO` | float64 | `0.1` | Trace sampling ratio (0.0–1.0, where 1.0 = sample all) |
118-
| `OTLP_USE_OPENTRACING_BRIDGE` | bool | `false` | **Deprecated.** Enable legacy OpenTracing bridge — only needed for services with unmigrated OpenTracing instrumentation |
118+
| `OTLP_USE_OPENTRACING_BRIDGE` | bool | `false` | **Deprecated.** Ignored — OpenTracing bridge has been removed. If set to `true`, a warning is logged at startup |
119+
| `OTEL_USE_LEGACY_INSTRUMENTATION` | bool | `false` | Revert to the deprecated `otelgrpc` contrib package for gRPC OpenTelemetry instrumentation. Set to `true` only for rollback |
120+
| `ENABLE_OTEL_METRICS` | bool | `false` | Enable OpenTelemetry metrics export via OTLP alongside Prometheus. Does not replace Prometheus |
121+
| `OTEL_METRICS_INTERVAL` | int | `60` | Export interval in seconds for OTEL metrics (only applies when `ENABLE_OTEL_METRICS=true`) |
119122

120123
## Error Tracking
121124

@@ -150,7 +153,7 @@ When `OTLP_ENDPOINT` is set, it takes precedence over New Relic OpenTelemetry co
150153
|----------|------------|-------|
151154
| `HTTP_HEADER_PREFIX` | `HTTP_HEADER_PREFIXES` | Single prefix replaced by comma-separated list |
152155
| `DISABLE_PORMETHEUS` | `DISABLE_PROMETHEUS` | Typo variant — both work, use the correct spelling |
153-
| `OTLP_USE_OPENTRACING_BRIDGE` | Remove | Legacy OpenTracing bridge — remove once all instrumentation uses OpenTelemetry |
156+
| `OTLP_USE_OPENTRACING_BRIDGE` | Remove | OpenTracing bridge has been removed — this field is now ignored (logs a warning if set to `true`) |
154157

155158
---
156159

howto/Debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Here's what a typical ColdBrew CPU profile looks like under load (Apple M1 Pro,
6565
| Go runtime (scheduling, GC) | ~15% | Goroutine scheduling, garbage collection |
6666
| `TraceIdInterceptor` | ~6% | Trace ID extraction and propagation |
6767
| `errors/notifier.SetTraceIdWithValue` | ~5% | Setting trace ID on error notifier context |
68-
| `otelgrpc.TagRPC` | ~1% | OpenTelemetry span creation |
68+
| gRPC OpenTelemetry stats handler | ~1% | OpenTelemetry span creation |
6969
| Prometheus metrics | ~1% | Histogram bucket recording |
7070

7171
{: .important }

integrations.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,13 @@ To configure generic OpenTelemetry, you can use the [OTLPConfig] struct:
156156

157157
```go
158158
type OTLPConfig struct {
159-
Endpoint string // OTLP gRPC endpoint (e.g., "localhost:4317")
160-
Headers map[string]string // Custom headers (e.g., API keys)
161-
ServiceName string // Name of your service
162-
ServiceVersion string // Version of your service
163-
SamplingRatio float64 // Sampling ratio (0.0 to 1.0)
164-
Compression string // "gzip" or "none"
165-
UseOpenTracingBridge bool // Deprecated: enable legacy OpenTracing bridge
166-
Insecure bool // Disable TLS (for local development)
159+
Endpoint string // OTLP gRPC endpoint (e.g., "localhost:4317")
160+
Headers map[string]string // Custom headers (e.g., API keys)
161+
ServiceName string // Name of your service
162+
ServiceVersion string // Version of your service
163+
SamplingRatio float64 // Sampling ratio (0.0 to 1.0)
164+
Compression string // "gzip" or "none"
165+
Insecure bool // Disable TLS (for local development)
167166
}
168167
```
169168

@@ -174,12 +173,11 @@ import "github.com/go-coldbrew/core"
174173

175174
func main() {
176175
config := core.OTLPConfig{
177-
Endpoint: "localhost:4317",
178-
ServiceName: "my-service",
179-
ServiceVersion: "v1.0.0",
180-
SamplingRatio: 0.1,
181-
// UseOpenTracingBridge: true, // only needed for legacy OpenTracing code
182-
Insecure: true, // for local development
176+
Endpoint: "localhost:4317",
177+
ServiceName: "my-service",
178+
ServiceVersion: "v1.0.0",
179+
SamplingRatio: 0.1,
180+
Insecure: true, // for local development
183181
}
184182
err := core.SetupOpenTelemetry(config)
185183
if err != nil {
@@ -201,12 +199,11 @@ import "github.com/go-coldbrew/core"
201199

202200
func main() {
203201
config := core.OTLPConfig{
204-
Endpoint: "localhost:4317", // Jaeger OTLP endpoint
205-
ServiceName: "my-service",
206-
ServiceVersion: "v1.0.0",
207-
SamplingRatio: 0.1,
208-
// UseOpenTracingBridge: true, // only needed for legacy OpenTracing code
209-
Insecure: true,
202+
Endpoint: "localhost:4317", // Jaeger OTLP endpoint
203+
ServiceName: "my-service",
204+
ServiceVersion: "v1.0.0",
205+
SamplingRatio: 0.1,
206+
Insecure: true,
210207
}
211208
err := core.SetupOpenTelemetry(config)
212209
if err != nil {

0 commit comments

Comments
 (0)