Commit Graph

182 Commits

Author SHA1 Message Date
Jaroslav Bachorik eb272bcc00
Add exception sampling event (#1297) 2020-04-20 16:31:54 +02:00
Lev Priima 07025dd9aa
no dd.* prefix in "env" and "version" tags (#1378) 2020-04-16 12:59:57 -07:00
Tyler Benson 07f99a98d8
Merge pull request #1221 from DataDog/tyler/trace-processor
Add TraceProcessor and move some existing functionality to rules
2020-04-14 13:33:46 -04:00
Lev Priima bd637732da
No logging when using default Value when parsing (#1364) 2020-04-13 15:15:24 -07:00
Tyler Benson d1dc756b12 Fix issues from code reviews. 2020-04-13 17:06:12 -04:00
Tyler Benson b85e023fbe Revert "add ..."metrics":{"_dd.measured":1}... to every span (#1336)"
This reverts commit cda39adf50.
2020-04-10 13:56:03 -04:00
Lev Priima 7f146d74dc
DD_SERVICE; DD_ENV; DD_VERSION env vars support (#1341)
DD_SERVICE; DD_ENV; DD_VERSION env vars support

* Config.valueOf("", null, "") with throw NPE

* mark unused public fields @Deprecated in Config.java

* keep unused public fields untouched

* retrun 2arg Config ctor
2020-04-10 10:50:11 -07:00
Nikolay Martynov 309f9e2ddb Introduce to API key config option
To stream line configuration in the future intropduce
`DD_API_KEY`/`DD_API_KEY_FILE` to provide agent with API
key. Currently this is only used for profiling but later may be used
for other parts of the agent too.
2020-04-06 12:02:51 -04:00
Nikolay Martynov cda34a6157 Merge branch 'master' into mar-kolya/add-profiling-site-config 2020-04-03 08:03:44 -04:00
Nikolay Martynov b429cf4c52 Add some deprecation notes 2020-04-03 07:52:26 -04:00
Nikolay Martynov e812d327fb Rename DD_PROFILING_SITE to DD_SITE 2020-04-03 07:10:42 -04:00
Nikolay Martynov e1f2052e25 Minor clean up and add one more test 2020-04-02 16:07:13 -04:00
Nikolay Martynov d1f1f8d6e9 Add option to configure Datadog site used to send profiling information 2020-04-02 15:56:05 -04:00
jean-philippe bempel 58ea15e590 if not populated returns null for toString 2020-04-02 19:17:26 +02:00
jean-philippe bempel 4d15d5ae96 Sensor information instead of excluding the fields 2020-04-02 18:26:14 +02:00
jean-philippe bempel 96757f0c58 Remove sensitive information from debug log
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
2020-04-02 17:54:02 +02:00
Lev Priima cda39adf50
add ..."metrics":{"_dd.measured":1}... to every span (#1336)
* 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>
2020-03-25 11:17:47 -07:00
Laplie Anderson cef6da61dc
Revert "Add config to capture stacktrace when a span duration exceeds threshold" 2020-03-23 19:13:29 -04:00
Tyler Benson 2f64edaea4 Make threshold based on average duration
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.
2020-03-10 15:08:12 -07:00
Tyler Benson 2b74487ed6 Add config to capture stacktrace when a span duration exceeds threshold
(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.)
2020-03-10 13:18:22 -07:00
Nikolay Martynov 6ff723e191 CR changes 2020-03-02 12:25:20 -05:00
Nikolay Martynov 2c33f0ace7 Add an option to force profiling right in the beginning of premain
Currently this blows up JVMs before 14
2020-02-29 00:36:50 +01:00
Nikolay Martynov 0752b07d92 Introduce dd.tags 2020-02-27 12:26:29 +01:00
Nikolay Martynov a43f2b7db6 Change profiling intake url 2020-02-20 12:58:39 -05:00
Nikolay Martynov fd58187994 Support JFR profiling 2020-02-11 14:55:19 -05:00
Tyler Benson 5c6f74fd5e
Merge pull request #1177 from DataDog/tyler/scope-depth-limit
Add limit to trace scope depth
2020-01-22 12:13:23 -08:00
Tyler Benson a280ae6b7f Check for both regular and lowercase names with decorator enabled flags. 2020-01-17 11:05:44 -08:00
Laplie Anderson e24d04e3a5 changes to config test 2020-01-16 12:02:21 -05:00
Laplie Anderson bed15079bc Rename Rule Based Sampling properties 2020-01-16 11:38:38 -05:00
Tyler Benson bcf81823b3 Add limit to trace scope depth
When limit is exceeded, a NoopScope is returned.
Allow custom ScopeManager to be provided, with the plan to remove `ScopeContext` customization in the future.
2020-01-15 11:51:06 -08:00
Laplie Anderson 712a5c1483 Disable decorators via config 2019-12-19 13:02:59 -05:00
Laplie Anderson c62beec606 Increase code coverage by removing unused method + tests 2019-11-19 10:47:14 -05:00
Laplie Anderson 5ff2fcaa63 Fix tests, increase code coverage, codenarc 2019-11-18 23:39:03 -05:00
Laplie Anderson 0c22e27f66 Config and builder 2019-11-18 12:04:22 -05:00
dougqh c2d969fc0e Closing Reader-s 2019-11-15 09:37:45 -05:00
dougqh 22ac1edfe2 Adding configuration variables needed for StatsD metric support 2019-10-25 11:29:49 -04:00
Tyler Benson 9ef3332140 Extract base test class and move Config class changes there. 2019-10-07 18:51:25 +02:00
dougqh c08ea1ff73 when -> which 2019-09-24 09:33:01 -04:00
Nikolay Martynov b50ab7e0dd Add back deprecated field 2019-09-10 12:57:50 -04:00
Nikolay Martynov 3b34970d52 Rename SERVICE -> SERVICE_TAG constant
To make meaning more clear
2019-09-10 11:41:44 -04:00
Tyler Benson df017e044a
Merge pull request #975 from DataDog/tyler/split-by-tag
Add new setting to allow renaming service by tag
2019-09-05 14:24:20 -07:00
Douglas Q Hawkins 2e5766ece9
Merge pull request #974 from DataDog/dougqh/no-lang-client-spans
Ensure "client" spans do not set the language tag
2019-09-05 13:38:25 -04:00
Tyler Benson 82f5076716 Add new setting to allow renaming service by tag
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.
2019-09-03 16:55:47 -07:00
dougqh 1d087574fd Removing unused imports
Removing unused imports caught by codeNarc
2019-09-03 16:49:20 -04:00
dougqh 4851cc9069 Re-running format through gradle
Need to figure out why IntelliJ and gradle are behaving differently for import order
2019-09-03 16:16:13 -04:00
dougqh 57beee76d2 Running Google Code Formatter
Changes here are all non-functional -- and in methods unrelated to the core change
2019-09-03 14:09:46 -04:00
dougqh 3e2ef885a5 Ensure "client" spans do not set the language tag
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.
2019-09-03 13:20:50 -04:00
Alex Antonov 93ae2678ff Added support for Haystack trace propagation 2019-09-03 11:04:01 +02:00
Laplie Anderson f853916dce Get hostname in a smarter way
Attempt to get hostname through environment variables and command before going to DNS
2019-07-19 17:35:52 -04:00
Laplie Anderson 331b8c8e99 Add resource name to the @Trace annotation 2019-07-19 09:52:19 -04:00