AgentObs.Handlers.Generic
(agent_obs v0.1.4)
View Source
Generic OpenTelemetry handler for AgentObs.
This handler creates basic OpenTelemetry spans without OpenInference semantic conventions. Use this handler for generic OTel backends that don't support OpenInference (e.g., Jaeger, Zipkin, generic APM tools).
Configuration
config :agent_obs,
handlers: [AgentObs.Handlers.Generic]
config :agent_obs, AgentObs.Handlers.Generic,
endpoint: "http://localhost:4318"Differences from Phoenix Handler
- Does not use OpenInference semantic conventions
- Simpler attribute structure (no message flattening)
- Uses standard OTel span kinds (INTERNAL, CLIENT, etc.)
- Suitable for general-purpose observability platforms
OpenTelemetry SDK Configuration
config :opentelemetry,
span_processor: :batch,
resource: [service: [name: "my_app"]]
config :opentelemetry_exporter,
otlp_protocol: :http_protobuf,
otlp_endpoint: System.get_env("OTEL_EXPORTER_OTLP_ENDPOINT")
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts the Generic handler GenServer.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(map()) :: GenServer.on_start()
Starts the Generic handler GenServer.