Config.toString() method is dumped when logging in debug the conf.
It includes in some case the profile api key when used with env vars.
Also proxy password is also dumped.
toString method generated by Lombok now excludes both fields
* add ..."metrics":{"_dd.measured":1}... to every span
* update tests to always have "metrics":{"_dd.measured":1} in every span
Authored-by: Lev Priima <lev.priima@data.dog>
This should help avoid too frequent of stacktraces when the configured threshold is a normal duration.
Alternatively, we could make it a percentage above the average.
(But only when span is not errored or finished on a different thread.)
Use the following config:
```
-Ddd.trace.span.duration.stacktrace.millis=1000
```
(One second is the default, 0 disables.)
When limit is exceeded, a NoopScope is returned.
Allow custom ScopeManager to be provided, with the plan to remove `ScopeContext` customization in the future.
This is a more generic form of the previous `split-by-domain` and `split-by-instance`.
(Note: evaluation is done when a tag is set, so If multiple tags are configured, the last tag set will take precidence.)
For example, this setting can be used to rename `aws-sdk` spans to be identified with the corresponding `aws.service` tag:
```
-Ddd.trace.split-by-tags=aws.service
```
There are some slight differences with this setting compared with`dd.trace.http.client.split-by-domain` and `dd.trace.db.client.split-by-instance`. `split-by-tags` applies to every span, where `split-by-domain` and `split-by-instance` only apply to http and db client spans respectively.
The core changes are in Config and ServerDecorator.
Moved default tagging from Config::getRuntimeTags to Config::getLocalRootSpanTags. This changes the result of Config::getMergedJmxTags as well.
To preserve language for servers changed ServerDecorator::afterStart.
Other changes are in tests - the most complicated part is in TagsAssert::defaultTags. This now contains a bit too much conditional logic for my liking.
Expose new options for configuring JMXFetch with standard datadog-agent config files with `jvm_direct: true` set as an instance attribute (this will be ignored by the datadog-agent).
For Example:
* `dd.agent.conf.d=/opt/datadog-agent/etc/conf.d`
* `dd.jmxfetch.configs=activemq.d/conf.yaml,jmx.d/conf.yaml`
will load jmx configs in those two files that have `jvm_direct: true` in their `instance` setup.
Environment variables can also be used: `DD_AGENT_CONF_D` and `DD_JMXFETCH_CONFIGS`
Depends on https://github.com/DataDog/jmxfetch/releases/tag/0.29.0 being released.