Through the Agent
On a server where the Zharp agent runs, apps can send their OpenTelemetry to the agent on localhost, and the agent forwards it to App Telemetry.
Every agent install listens for OpenTelemetry from applications on the same host. There is nothing to turn on. Sending through the agent means the app needs no key of its own and the agent batches, compresses and retries for it — and queues while Zharp is unreachable.
Point the app at the agent
127.0.0.1:4317— OTLP over gRPC127.0.0.1:4318— OTLP over HTTP
Any OpenTelemetry SDK
OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318 OTEL_SERVICE_NAME=checkout-api OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=production
A Zharp server SDK
Set its endpoint to the agent:
ZHARP_ENDPOINT=http://127.0.0.1:4318 ZHARP_KEY=zpk_… # the SDKs need a key to start; the agent sends with its own ZHARP_SERVICE=checkout-api
The Node.js SDK reads ZHARP_ENV rather than ZHARP_ENVIRONMENT; the options on each SDK page list its variables.
Which app the data goes to
The agent forwards traces and logs unchanged, as OTLP, to Zharp's ingest with the agent's own key — a workspace key — so the key in the app isn't used. service.name picks the app: one matching an app's service name goes to it, and a new one shows up as a discovered app to name and claim. Set service.name to the service name shown on the app's setup page.
The agent adds the host's host.name and os.type, never replacing what the app set.
The ports bind to 127.0.0.1 because traces carry URLs, queries and error messages. An app in a container can't reach the host's 127.0.0.1 unless it runs on the host's network. Browser and mobile apps send straight to Zharp, never through the agent.
Turning it off
Install with --no-otlp, or set ZHARP_NO_OTLP=1:
# Linux and macOS: install without the OTLP receiver curl -fsSL https://api.zharp.io/api/v1/install/agent.sh | sh -s -- --token YOUR_TOKEN --no-otlp # Windows: set this before the install command $env:ZHARP_NO_OTLP="1"
On an existing install, remove the otlp receiver and the traces/otlp and logs/otlp pipelines from /etc/zharp-collector/config.yaml, add the line ## OTLP receiver left out (--no-otlp); `zharp-collector update` keeps it out. at the top so an update doesn't add them back, and restart the agent.
Agents installed before this
sudo zharp-collector update adds the receiver, the exporter and the two pipelines. The old traces pipeline is replaced; one you edited yourself is left as it is and reported.
The agent's own sources — log files, containers, the journal and metrics — are unaffected and still go to the Logs and Infrastructure pages.