[Weave] OTEL auth updates and collector workflow#2199
Conversation
📚 Mintlify Preview Links📝 Changed (1 total)📄 Pages (1)
🤖 Generated automatically when Mintlify deployment succeeds |
🔗 Link Checker Results✅ All links are valid! No broken links were detected. Checked against: https://wb-21fd5541-weave-otel-auth-update.mintlify.app |
zbirenbaum
left a comment
There was a problem hiding this comment.
just some stuff on the collector. We should emphasize using a collector is suggested
| To use a collector, first create a `collector-config.yaml` file that configures the collector to receive OTLP traces and export them to Weave: | ||
|
|
||
| ```yaml lines {23,26} collector-config.yaml title="collector-config.yaml" | ||
| extensions: |
There was a problem hiding this comment.
Command to start collector:
docker run \
-v ./config.yaml:/etc/otelcol-contrib/config.yaml \
-e WANDB_API_KEY="YOUR_API_KEY" \
-e WANDB_OTLP_ENDPOINT="https://trace.wandb.ai/otel" \
-e DEFAULT_WANDB_ENTITY="YOUR_ENTITY" \
-e DEFAULT_WANDB_PROJECT="YOUR_PROJECT" \
-p 4318:4318 \
otel/opentelemetry-collector-contribconfig.yaml
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
exporters:
otlphttp/weave:
endpoint: ${env:WANDB_OTLP_ENDPOINT}
headers:
wandb-api-key: ${env:WANDB_API_KEY}
sending_queue:
batch:
processors:
resource:
attributes:
- key: wandb.entity # Resource attributes field
value: ${env:DEFAULT_WANDB_ENTITY} # Value to inject
action: insert # Inject only if not already present
- key: wandb.project
value: ${env:DEFAULT_WANDB_PROJECT}
action: insert
service:
pipelines:
traces:
receivers: [otlp]
processors: [resource]
exporters: [otlphttp/weave]Configuration
In any application configured to export OTel traces, just set: os.environ['OTEL_EXPORTER_OTLP_ENDPOINT'] = 'http://localhost:4318
Everything will forward to weave with the project, entity, and api key auto-configured
If you set wandb.project or wandb.entity in your application trace provider resource attributes they will take precedent over the default defined in the config.yaml.
Description
Resolves DOCS-1940. This updates: