Integrate Qpoint Proxy into an OpenTelemetry Pipeline

Set Up the OpenTelemetry Collector

Installation

First, you need to install the OpenTelemetry Collector. You can deploy it as a Docker container for simplicity. Here’s how you can run it:

docker run --name otel-collector -d -p 4317:4317 -p 55681:55681 \
    -v $(pwd)/otel-collector-config.yaml:/etc/otel-collector-config.yaml \
    otel/opentelemetry-collector-contrib

Make sure to replace $(pwd)/otel-collector-config.yaml with the path to your configuration file, which we will define in the next steps.

Configuration

Create a file named otel-collector-config.yaml. This file will configure the OpenTelemetry Collector to directly collect logs from Docker container log files. Here’s a sample configuration:

receivers:
  filelog:
    include: ["/var/lib/docker/containers/*/*.log"]
    start_at: beginning
    operators:
      - type: json_parser
        parse_from: body

exporters:
  otlp:
    endpoint: "localhost:4317"
    tls:
      insecure: true

service:
  pipelines:
    logs:
      receivers: [filelog]
      exporters: [otlp]

Run the Docker Container for Qpoint Proxy

Next, run the Qpoint Proxy.

docker run -d \
    -p 10080:10080 \
    -p 10443:10443 \
    -p 18080:18080 \
    -p 18443:18443 \
    us-docker.pkg.dev/qpoint-edge/public/qpoint:head \
    proxy \
    --log-level=info \
    --registration-token=$TOKEN

Monitor and Verify Logs

Finally, it’s crucial to monitor the OpenTelemetry Collector logs and verify that logs are being captured and processed correctly. Use Docker logs to check the status and output of your OpenTelemetry Collector:

docker logs otel-collector

Last updated