โ OpenTelemetry collector integration in Helios
Follow the instructions below to leverage distributed tracing by using your own OpenTelemetry collector and chaining it with the Helios OpenTelemetry SDK.
With the Helios OpenTelemetry SDK, you may choose to keep your own OpenTelemetry collector and simply chain the collectors so that incoming data is sent to the Helios collector. This is supported by a simple configuration change to the SDK to:
- Send data to your own collector; and then
- Export data from your own collector into Helios.
Send data to your own collector
First, change the collector endpoint on the init
method of the SDK to have your own collector endpoint:
import initialize from 'helios-opentelemetry-sdk';
initialize({
apiToken: 'TOKEN',
enable: true,
serviceName: 'SERVICE_NAME',
collectorEndpoint: 'YOUR_COLLECTOR_ENDPOINT'
});
from helios import initialize
hs = initialize(api_token = 'TOKEN', service_name = 'SERVICE_NAME', enabled = True, collector_endpoint = 'YOUR_COLLECTOR_ENDPOINT')
You can retrieve the token directly from the Helios app.
Then, in your collector configuration, you will have to configure a receiver endpoint for the Helios SDK:
receivers:
otlp:
protocols:
http:
endpoint: 0.0.0.0:55681
Exporting data from your own collector
Finally, in order to have your data sent to Helios as well after going through your collector, you should set an exporter in your collector config as well and add the authorization header with the token that was given to you by Helios:
exporters:
otlphttp:
endpoint: "https://collector.gethelios.dev"
traces_endpoint: "https://collector.gethelios.dev/v1/traces"
headers:
Authorization: "<<HS_TOKEN>>"
All set
Traces should show app in the Helios application and also make advanced trace visualization available.
Updated 4 months ago