Skip to content

[Weave] OTEL auth updates and collector workflow#2199

Draft
dbrian57 wants to merge 1 commit intomainfrom
weave/otel-auth-update
Draft

[Weave] OTEL auth updates and collector workflow#2199
dbrian57 wants to merge 1 commit intomainfrom
weave/otel-auth-update

Conversation

@dbrian57
Copy link
Contributor

@dbrian57 dbrian57 commented Feb 26, 2026

Description

Resolves DOCS-1940. This updates:

  • OTEL code examples and auth info with a smoother auth method. This method is much more familiar to OTEL users.
  • Adds a workflow on how to set up an OTEL collector that collects traces and sends them to Weave.

@dbrian57 dbrian57 requested a review from a team as a code owner February 26, 2026 18:26
@dbrian57 dbrian57 changed the title Updates auth for code examples and adds a new workflow that uses coll… [Weave] OTEL auth updates and collector workflow Feb 26, 2026
@github-actions
Copy link
Contributor

📚 Mintlify Preview Links

🔗 View Full Preview

📝 Changed (1 total)

📄 Pages (1)

File Preview
weave/guides/tracking/otel.mdx Otel

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: 927d608 at 2026-02-26 18:33:33 UTC

@github-actions
Copy link
Contributor

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-weave-otel-auth-update.mintlify.app

@dbrian57 dbrian57 marked this pull request as draft February 26, 2026 20:13
Copy link

@zbirenbaum zbirenbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-contrib

config.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants