Commit Graph

3033 Commits

Author SHA1 Message Date
Luca Abbati edacd7a41d
Refactor weak hash map to be able to reuse functionalities 2019-07-19 16:18:38 +02:00
Laplie Anderson 1214b90a25 Add a sleep to ensure everything is started up 2019-07-19 10:10:24 -04:00
Laplie Anderson 331b8c8e99 Add resource name to the @Trace annotation 2019-07-19 09:52:19 -04:00
Pedro Silva 2627a452c0 unit tests for records(TopicPartition) method of kafka-clients instrumentation. introduce safeguards when instrumenting iterator() so that duplication of traces is not allowed. do not allow subList() to be instrumented 2019-07-18 23:09:33 +01:00
gygabyte 2e51afc22c
Merge pull request #2 from DataDog/master
merge from original
2019-07-18 22:52:53 +01:00
Tyler Benson 13b794c504
Merge pull request #917 from DataDog/tyler/null-span-in-scope
Assert span in scope can't be null and add tests to verify
2019-07-18 13:43:19 -07:00
Laplie Anderson 74099735ed Java 7 doesn't have Process.waitFor(time) so use Spock's timeout 2019-07-18 16:28:35 -04:00
Laplie Anderson 8909e7d4e1 Java 7 complains about this type 2019-07-18 15:44:22 -04:00
Tyler Benson 17d26a4934 Assert span not null and use NoopSpan instead. 2019-07-18 12:38:49 -07:00
Laplie Anderson e99b974cb3 Don't use isAlive() in tests and do more in the CLI app 2019-07-18 15:19:09 -04:00
Laplie Anderson 41a2e7b51a Cli Application smoke test
simple cli application and test
2019-07-18 11:14:59 -04:00
Luca Abbati 35b928be7c
Refactor ClassLoaderScopeWekaMap 2019-07-18 15:34:26 +02:00
Nikolay Martynov 05af20d29c
Merge pull request #921 from DataDog/mar-kolya/fix-javadoc
Minor javadoc fix
2019-07-18 09:03:37 -04:00
Nikolay Martynov ab7786d352 Minor javadoc fix 2019-07-17 16:58:29 -04:00
Laplie Anderson 0f9b28df27
Merge pull request #914 from DataDog/landerson/google-http-client
Instrumentation of Google Http Client
2019-07-17 16:17:38 -04:00
Laplie Anderson fb5e9c98dc
Merge pull request #920 from DataDog/landerson/container-tagging
Container ID Tagging
2019-07-17 16:12:04 -04:00
Laplie Anderson 5956f51e07 Change container info to a singleton ContainerInfo
DDTraceOTInfo wasn't the best place for container information.  Changed ContainerInfo.java to have a static instance
2019-07-17 13:01:08 -04:00
Laplie Anderson 719bf0ad76 Remove reference to private repo 2019-07-17 12:00:31 -04:00
Luca Abbati e3a6d40e77
Add tests for ClassLoaderScoperWeakMap 2019-07-17 12:46:24 +02:00
Luca Abbati 48aff5f754
Add all helpers required for ClassLoaderScopedWeakMap usage + re-enable all tests 2019-07-17 09:49:26 +02:00
Laplie Anderson d03a2a95e2 Change to @Getter/@Setter to be above coverage threshold
Since toString(), equals(), and hashCode() are never called, the code coverage for the classes are too low.

In the future, we should ignore code coverage of lombok generated methods
2019-07-16 19:09:00 -04:00
Laplie Anderson 4853801813 Add container id headers to request builder 2019-07-16 18:29:59 -04:00
Laplie Anderson 9dbe3a0a17 Fix part of path to match 2019-07-16 18:29:59 -04:00
Laplie Anderson d74ffc3db0 Parsing tests from RFC and reference impl 2019-07-16 18:29:59 -04:00
Laplie Anderson 369658c200 Initial cgroups parsing implementation 2019-07-16 18:29:59 -04:00
Tyler Benson 7d6bdcc35d
Merge pull request #916 from DataDog/tyler/remove-ss-default
Remove default instance
2019-07-16 13:23:16 -07:00
Nikolay Martynov 615bce0a31
Merge pull request #919 from DataDog/mar-kolya/remove-gradle-version
Remove version from gradle wrapper definition
2019-07-16 16:18:07 -04:00
Nikolay Martynov 36487a0456 Remove version from gradle wrapper definition
It doesn't look like it is doing anything useful but instead it seems
to set version in resulting build jar which is not expected.
2019-07-16 10:33:07 -04:00
Luca Abbati 840b8b407d
No matter what, it won't work :) I am now in the mood 'try everything in the world until it works' 2019-07-16 15:39:00 +02:00
Luca Abbati cb430c566b
Remove obsolete test 2019-07-16 11:53:22 +02:00
Luca Abbati bfa5712c04
Add comments to ClassLoader scoped weak map 2019-07-16 11:02:26 +02:00
Luca Abbati de6f33c035
Draft of per-classloader netty AttributeKey definition 2019-07-16 11:02:25 +02:00
Luca Abbati fac3a93445
Make netty 4.0 attributes definition compatible with Apache Atlas 1.1.0
The issue we are trying to fix here seems to be a result of two concurrent issues.

Cassandra driver's used by atlas 1.1.0 brings in a old version of netty < 4.0.23.

In version 4.0.25 netty raised exception in `UniqueName` class for duplicate name

```
if (map.putIfAbsent(name, Boolean.TRUE) != null) {
            throw new IllegalArgumentException(String.format("'%s' is already in use", name));
        }
```

This changed in 4.0.26 where exception was not thrown, instead the duplicate key was just ignored.

```
    protected UniqueName(String name) {
        this.name = checkNotNull(name, "name");
        id = nextId.incrementAndGet();
    }
```

Now this alone would not be enough. The only way I was able to reproduce is if two different class loaders tries to load the
same class `AttributeKeys` twice.
I tried to look into Atlas source code (which is huge) and I could not find a clear path of how this would be possible.

Further more, looking at some build scripts that a user experiencing this issue provided,
it looks like they are doing everything correctly and there is nothing they should change.

In conclusion, I believe that even if this is not a very clean approach,
we should be resilient to this use case, when a customer using netty <4.0.25 in an
older version of Apache Atlas (or with some sort of class loader behavior).
2019-07-16 11:02:25 +02:00
Tyler Benson e08e3a787c Allow null to be set in Scope for Span
This is useful to temporarily remove a trace from scope for a defined period.
2019-07-15 19:11:51 -07:00
Tyler Benson 747f758a70 Remove default instance
It’s not very interesting and breaks the definition of “instance” when we want to see the db name when no instance name is defined.
2019-07-15 12:52:57 -07:00
Nikolay Martynov 3884cc088e
Merge pull request #915 from DataDog/mar-kolya/avoid-jetty-10
Avoid Jetty 10
2019-07-15 10:43:29 -04:00
Nikolay Martynov 1fbe395586 Avoid Jetty 10 in servlet-3 test
Alpha version of Jetty 10 was released and it seems to be compiled for
java versions above 8 so tests fail on java8.

Limit latest dep Jetty tests to Jetty 9 for now.
2019-07-15 10:15:21 -04:00
Nikolay Martynov 3191eb7058 Avoid Jetty 10
Alpha version of Jetty 10 was released and it seems to be compiled for
java versions above 8 so tests fail on java8.

Limit latest dep Jetty tests to Jetty 9 for now.
2019-07-15 10:15:16 -04:00
Luca Abbati 5b3d4b8e35
Merge pull request #905 from DataDog/labbati/jmx-as-daemon
Run JmxFetch app as a daemon
2019-07-15 08:18:09 -04:00
Tyler Benson ec931463a4
Merge pull request #885 from DataDog/tyler/instance-name-testing
Additional testing for split-by-instance config
2019-07-15 01:27:49 -04:00
gygabyte 833e811216
Merge pull request #1 from DataDog/master
from original
2019-07-13 11:14:19 +01:00
Nikolay Martynov 65c6b1fa97
Merge pull request #911 from DataDog/mar-kolya/kafka-trace-records
Instrument records(TopicPartition) in kafka consumer
2019-07-12 18:43:45 -04:00
Laplie Anderson 0eab4688cd Remove unnecessary semicolons 2019-07-12 16:36:02 -04:00
Nikolay Martynov 6516bd7ad7 Minor comment update 2019-07-12 16:26:39 -04:00
Nikolay Martynov 21213495df Merge branch 'master' into mar-kolya/kafka-trace-records 2019-07-12 16:22:06 -04:00
Tyler Benson 98130936cf
Merge pull request #912 from DataDog/revert-908-mar-kolya/kafka-trace-records
Revert "Trace 'records(TopicPartitions)` in kafka consumer"
2019-07-12 16:08:50 -04:00
Laplie Anderson 8a7336a017 Use 1.19.0 as first supported version 2019-07-12 16:06:19 -04:00
Laplie Anderson 82ee01cadf Implement instrumentation for async requests 2019-07-12 15:41:14 -04:00
Nikolay Martynov 1abd50779c
Merge pull request #913 from DataDog/mar-kolya/update-gradle
Update gradle to 5.5.1
2019-07-12 10:41:29 -04:00
Nikolay Martynov e3b4ffb240 Update gradle to 5.5.1 2019-07-12 10:07:08 -04:00