Module zipkin

ballerinax/zipkin Ballerina library

1.1.0

Overview

The Zipkin Observability Extension provides an implementation for tracing and publishing traces to a Zipkin Agent.

Key Features

  • Publish distributed traces to a Zipkin Agent
  • Configurable agent hostname, port, and reporter endpoint
  • Support for token-based authentication on the reporter endpoint
  • Simple configuration via import and Config.toml

Enabling Zipkin Extension

To package the Zipkin extension into the Jar, follow the following steps.

  1. Add the following import to your program.
Copy
import ballerinax/zipkin as _;
  1. Add the following to the Ballerina.toml when building your program.
Copy
[package]
org = "my_org"
name = "my_package"
version = "1.0.0"

[build-options]
observabilityIncluded=true

To enable the extension and publish traces to Zipkin, add the following to the Config.toml when running your program.

Copy
[ballerina.observe]
tracingEnabled=true
tracingProvider="zipkin"

[ballerinax.zipkin]
reporterEndpoint="<TRACE_API>"  # Optional Configuration. This will override the values of agentHostname & agentPort.
agentHostname="127.0.0.1"  # Optional Configuration. Default value is localhost
agentPort=9411             # Optional Configuration. Default value is 9411

Note

  • If the reporterEndpoint is provided, the agentHostname and agentPort will be ignored.
  • If you want to pass a token for the reporter endpoint, configure the token as the environment variable TRACE_API_TOKEN and pass it to the reporterEndpoint as follows.
Copy
[ballerinax.zipkin]
reporterEndpoint="<TRACE_API>?<TRACE_API_TOKEN_KEY>=$TRACE_API_TOKEN"

Import

import ballerinax/zipkin;Copy

Other versions

Metadata

Released date: 4 days ago

Version: 1.1.0


Compatibility

Platform: java25

Ballerina version: 2201.14.0

GraalVM compatible: Yes


Pull count

Total: 1263

Current verison: 1


Weekly downloads