open-telemetry / open-telemetry/opentelemetry-cpp-contrib

Datadog and otel_ngx_module

Open
#296 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
153
Forks
184
Avg merge
2d 9h
Merged PRs (30d)
26

Description

Datadog wants to integrate more closely with otel_ngx_module, if for no other reason than ingress-nginx plans to drop support for nginx-opentracing in favor of otel_ngx_module.

This has been discussed previously in an ingress-nginx issue and in an opentelemetry-cpp issue.

The Datadog Agent (Datadog's equivalent to an OpenTelemetry collector) speaks OTLP, and so today Datadog customers can use otel_ngx_module as is.

However, Datadog tracing libraries support some features that are not currently expressible in the OpenTelemetry API. The most prominent example in the case of C++ is how sampling is configured.

Instead of restricting Datadog to the collector, we are considering (with the blessing of opentelemetry-cpp and ingress-nginx) writing a library that implements the opentelemetry-cpp API by defining a TracerProvider and related classes. Then, OpenTelemetry projects that wish to provide full-featured Datadog tracing can depend on this library and install its TracerProvider at runtime. Any code written in terms of the opentelemetry-cpp API would remain unchanged.

Let's call this hypothetical library "dd-opentelemetry-cpp".

I've opened up this issue to discuss with the maintainers of otel_ngx_module whether it would be acceptable to propose changes that would integrate dd-opentelemetry-cpp into otel_ngx_module.

At a glance, the configuration and runtime setup of the nginx module would have to be revised to allow for a "provider" degree of freedom, and whatever modifications to existing configuration that would require. The build would also be modified to include dd-opentelemetry-cpp.

dd-opentelemetry-cpp would be a C++17 library that depends only on opentelemetry-cpp, dd-trace-cpp, and optionally libcurl.

Finally, as background information, here is a survey of relevant Datadog libraries:

  • dd-opentracing-cpp is an OpenTracing-based plugin that we seek to deprecate. It is what is currently used by ingress-nginx in conjunction with nginx-opentracing.
  • dd-trace-cpp is a new dedicated Datadog tracing library that I wrote to replace dd-opentracing-cpp. It's a C++17 library with no dependencies aside from, optionally, libcurl.
  • nginx-datadog is a Datadog-specific nginx module, based largely on nginx-opentracing, that uses dd-trace-cpp under the hood and allows for minimal-config tracing of nginx using Datadog.

What do you think about the idea of integrating the hypothetical dd-opentelemetry-cpp into otel_ngx_module?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests. Start by reviewing otel_ngx_module's configuration and runtime setup, then inspect its build definitions alongside the proposed dd-opentelemetry-cpp dependencies and TracerProvider integration. Done would require maintainer agreement on the design before implementation; no concrete acceptance criteria are stated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, nginx
Domain
backend, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.