This plugin implements Jaeger Remote Sampling protocol on Golang cutom plugin mechanism.
Prerequisites
Golang 1.23.0 or later
Building
$ go mod download
<snip>
$ make
Then, the c-shared object will be created as:
ls *.so
custom_jeager_remote.so
Configuration
For specifying the place of plugin’s shared object, we need to specify the path in plugin.yaml:
plugins:
- /path/to/custom_jeager_remote.so
For custom jeager plugin, we need to add custom section in fluent-bit conf:
Basic structure
With ini format:
[CUSTOM]
# The name registered in the Go code ("jaeger_remote")
Name jaeger_remote
# --- Mode Selection ---
# Can be: "client", "server", or "all" (default)
Mode all
# --- Add parameters for the selected mode below ---
With Yaml format:
customs:
- name: jaeger_remote
# --- Mode Selection ---
# Can be: "client", "server", or "all" (default)
mode: all
# --- Add parameters for the selected mode below ---
Mode: client
In this mode, the plugin acts as an OpenTelemetry client, fetching sampling strategies from an external server.
With ini format:
[CUSTOM]
Name jaeger_remote
Mode client
# URL of the OTLP-compatible collector to send traces to.
client.server_url http://localhost:4318
# URL of the Jaeger-compatible sampling server.
client.sampling_url http://localhost:5778/sampling
With Yaml format:
customs:
- name: jaeger_remote
mode: client
# URL of the OTLP-compatible collector to send traces to.
client.server_url: http://localhost:4318
# URL of the Jaeger-compatible sampling server.
client.sampling_url: http://localhost:5778/sampling
Mode: Server
In this mode, the plugin polls a Jaeger Collector for strategies and serves them via its own HTTP and/or gRPC endpoints. You can enable one or both by providing their listen addresses.
With ini format:
[CUSTOM]
Name jaeger_remote
Mode server
# --- Connection to Jaeger Collector ---
server.endpoint jaeger-collector:14250
server.service_names frontend,backend,database
# --- Exposed Endpoints (enable one or both) ---
server.http.listen_addr 0.0.0.0:8899
server.grpc.listen_addr 0.0.0.0:9099
# --- Advanced Connection Settings (Optional) ---
server.retry.initial_interval 10s
server.keepalive.time 30s
Custom Go Plugin for Jaeger
Note: This plugin is under heavily development.
This plugin implements Jaeger Remote Sampling protocol on Golang cutom plugin mechanism.
Prerequisites
Building
Then, the c-shared object will be created as:
Configuration
For specifying the place of plugin’s shared object, we need to specify the path in plugin.yaml:
For custom jeager plugin, we need to add custom section in fluent-bit conf:
Basic structure
With ini format:
With Yaml format:
Mode: client
In this mode, the plugin acts as an OpenTelemetry client, fetching sampling strategies from an external server.
With ini format:
With Yaml format:
Mode: Server
In this mode, the plugin polls a Jaeger Collector for strategies and serves them via its own HTTP and/or gRPC endpoints. You can enable one or both by providing their listen addresses.
With ini format:
With Yaml format:
Mode: server (Local File)
This mode loads a static strategy file and serves it via HTTP and/or gRPC. It does not connect to a remote Jaeger Collector.
With ini format:
With Yaml format:
Mode: All
This mode enables both client and server functionalities simultaneously.
With ini format:
With Yaml format:
Parameter Reference
modeclient,server, orall.allclient.server_urlclient/allclient.sampling_urlclient/allclient.rateclient/all5sserver.endpointserver/allserver.strategy_fileserver/allserver.endpoint.(Disabled)server.service_namesserver/allserver.http.listen_addrserver/all(Disabled)server.grpc.listen_addrserver/all(Disabled)server.headersserver/allserver.tls.insecureserver/alltrue, TLS certificate verification is skipped when connecting to the Jaeger Collector.falseserver.tls.server_name_overrideserver/allserver.tls.ca_fileserver/allserver.tls.cert_fileserver/allserver.tls.key_fileserver/allserver.keepalive.timeserver/all(Disabled)server.keepalive.timeoutserver/all20sserver.keepalive.permit_without_streamserver/alltrue, allows pings to be sent even if there are no active streams.trueserver.retry.initial_intervalserver/all5sserver.retry.max_intervalserver/all5mserver.retry.multiplierserver/all1.5server.retry.max_retryserver/all10Run
Put c-chared object in the specified path and run fluent-bit: