golem-enable-otlp-scala

Configure the golem-otlp-exporter plugin to export traces, logs, and metrics from Scala Golem agents.

1.5k|212|Updated Nov 24, 2023
One-click install
npx skills add https://github.com/golemcloud/golem --skill golem-enable-otlp-scala
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: golem-enable-otlp-scala
Source: https://github.com/golemcloud/golem/tree/main/golem-skills/skills/scala/golem-enable-otlp-scala
Command: npx skills add https://github.com/golemcloud/golem --skill golem-enable-otlp-scala

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scala Golem agents emit no telemetry by default, making it hard to observe agent invocations, RPC calls, and resource usage in production. This Skill guides you through enabling the built-in golem-otlp-exporter plugin so traces, logs, and metrics flow to any OTLP-compatible collector.

Core Features & Use Cases

  • Plugin Configuration: Add the golem-otlp-exporter plugin to golem.yaml with endpoint, signals, headers, and service-name-mode parameters, including per-environment presets.
  • Custom Spans: Create custom trace spans with attributes using the ContextApi from the Scala SDK, with automatic trace context propagation across HTTP routes and RPC calls.
  • Metrics & Logs Export: Export 20+ built-in runtime metrics (invocation counts, memory, fuel, transactions) and forward log output to the collector.
  • Use Case: You are deploying a Scala agent to production and need distributed tracing in Jaeger and metrics in Prometheus. Enable the plugin in golem.yaml, run golem deploy, and point the endpoint at your OTLP collector.

Quick Start

Enable the OTLP exporter plugin for my Scala Golem agent and show me how to add a custom span with the ContextApi.

Frequently Asked Questions about golem-enable-otlp-scala

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable OpenTelemetry tracing for a Golem agent?

Add the built-in golem-otlp-exporter plugin to your component in golem.yaml with an endpoint parameter pointing to your OTLP collector, then run golem deploy. No separate plugin registration is needed since the exporter is built in.

How do I create custom spans in a Scala Golem agent?

Use ContextApi.startSpan from the golem.host package to start a span, set attributes with setAttribute or setAttributes, and call finish when done. The current context exposes the trace ID via ContextApi.currentContext().

What metrics does the golem-otlp-exporter plugin export?

When metrics is included in signals, it exports invocation counts and durations, memory gauges, fuel consumption, error and restart counts, resource lifecycles, transaction outcomes, and oplog lag. Each metric carries service.name, agent ID, and component ID attributes.

Can I use different OTLP endpoints per environment?

Yes, use presets in golem.yaml with pluginsMergeMode set to replace to override the plugin configuration per environment. This lets you point production at a remote collector with authentication headers while development uses localhost.

Does the OTLP plugin require separate installation?

No, golem-otlp-exporter is a built-in plugin, so no golem plugin register step is required. You only add it to the component's plugins section in golem.yaml and redeploy for it to take effect.