opentelemetry-cpp-contrib icon indicating copy to clipboard operation
opentelemetry-cpp-contrib copied to clipboard

Regarding setup of OTEL HTTPD instrumentation with Zipkin backend

Open kpratyus opened this issue 4 years ago • 0 comments

I am trying to setup the HTTPD instrumentation module. These are the steps I followed

  1. Running the Dockerfile
  2. Loading the libstdc++.so.6 module, otel.so module and OpenTelemetry.conf file in the apache.conf

This is my Opentelemetry.conf file

<IfModule mod_otel.cpp>
# OpenTelemetryExporter set exporter type:
# file - means put spans into file
# otlp - means use otlp

# OpenTelemetryExporter   file
# if you don't specify path for exporter by default standard error will be used
# which is just simply apache error log
# OpenTelemetryPath /tmp/output-spans

OpenTelemetryExporter   otlp
OpenTelemetryEndpoint docker.for.mac.localhost:51103

# OpenTelemetryBatch for batch configuration. Takes 3 arguments:
# Max Queue Size
# Delay (in milliseconds, 1000 = 1s)
# Max Export Batch Size

# OpenTelemetryBatch 10 5000 5

# OpenTelemetryPropagators sets which context propagator should be used (defaults to none)
# currently supported values are (only one can be specified at the moment):
# trace-context - headers: tracestate, traceparent
# b3 - single header (b3)
# b3-multiheader - headers: X-B3-TraceId, X-B3-SpanId

OpenTelemetryPropagators b3-multiheader

# OpenTelemetryIgnoreInbound (defaults to true) indicates that we don't trust incoming context.
# This is safe when httpd is an edge server with traffic from Internet. Set it to false only
# if you run httpd in safe environment.

# OpenTelemetryIgnoreInbound off

OpenTelemetrySetResource service.name apache-web-server
OpenTelemetrySetAttribute foo bar

</IfModule>

I am running the dockerfile on Mac. I have a Zipkin instance running on a separate docker image which is mapped to localhost:51103. Whenever I use the "OpenTelemetryExporter file" I can see the output spans.
Could someone help me with the steps I am missing. Thanks!!

kpratyus avatar Dec 02 '21 10:12 kpratyus