feat!: Set a default service name (DD_SERVICE) when no service is configured by zacharycmontoya · Pull Request #158 · DataDog/dd-trace-cpp

Description

Adds a default service for the configuration if none was set in the DD_SERVICE environment variable or user configuration. This is a breaking change as previously a missing service would throw a configuration initialization error.

The default value will be set to the name of the executable.

Motivation

This aligns the cpp tracer behavior for an unconfigured DD_SERVICE with the expected behavior of all the tracers in our Config Consistency initiative.

Additional Notes

Also updates the parametric test so that the DD_ENV behavior works as expected.

This has been tested on Ubuntu 24.04 (run on a Windows machine in WSL), Windows 11, and macOS Monterey

Jira ticket: APMAPI-709 APMAPI-708