Verified Commit f1487339 authored by Hercules Merscher's avatar Hercules Merscher 🌴
Browse files

fix: README

parent c6abe167
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ export GITLAB_TRACING="otlp://localhost:4318"
When `GITLAB_TRACING` is set, LabKit automatically creates and configures a tracer:

- **Rails applications**: Railtie automatically inserts Labkit::Tracing::RackMiddleware into the middleware stack
- **Non-Rails applications**: Works automatically with no additional configuration
- **Non-Rails applications**: Tracer is auto-initialized, but `Labkit::Tracing::RackMiddleware` must be manually added to your middleware stack for HTTP request tracing (see [Rack Middleware](#rack-middleware))

Auto-initialization provides:
- Automatic tracer creation with connection string settings (sampler, exporter, service name)
@@ -78,11 +78,6 @@ The following connection string formats and query parameters are supported:
  - **Behavior**: Outputs spans immediately to stdout with no remote export
  - **Benefits**: No external collector required, instant feedback, simple debugging

**HTTPS Enforcement:** For security, non-localhost OTLP connections are automatically upgraded to HTTPS. Localhost addresses (`localhost`, `127.0.0.1`, `::1`) use plain HTTP. For example:
- `otlp://localhost:4318``http://localhost:4318`
- `otlp://collector.example.com:4318``https://collector.example.com:4318`

Ensure your OTLP collector supports TLS when using non-localhost endpoints.

### Sampling

@@ -187,7 +182,8 @@ export GITLAB_TRACING="otlp://localhost:4318"
- **No application code changes required** - just set the environment variable

**Non-Rails Applications (Sinatra, Grape, standalone Ruby):**
- Auto-initialization happens automatically when `require 'gitlab-labkit'` is called, so no manual setup is needed.
- Tracer auto-initialization happens automatically when `require 'gitlab-labkit'` is called.
- However, you must manually add `Labkit::Tracing::RackMiddleware` to your middleware stack for HTTP request tracing. See the [Rack Middleware](#rack-middleware) section for details.

Auto-initialization:
- Creates tracer with connection string settings (sampler, exporter, endpoints)