Commit Graph

95 Commits

Author SHA1 Message Date
Nikolay Martynov fd75575796 Disable peer hostname tag for http servers
Getting peer hostname makes DNS request
2020-02-14 11:25:07 -05:00
Tyler Benson 51bffa2e8a Move agent api classes to bootstrap package so they're not analyzed by muzzle
Also move jdbc classes to bootstrap to reduce size and complexity of those reference checkers.

These changes reduce the total file size of these instrumentation classes by 635k, which should also result in decent memory savings.
2020-02-10 15:09:15 -08:00
Tyler Benson 99992df998 Fix tagging query string for additional servers
Add test to common test suite and adapt each test.
2019-12-17 09:33:27 -08:00
Trask Stalnaker 847a76cb04 Add missing tag verification 2019-11-22 10:59:47 -08:00
Trask Stalnaker 1987e86ebf Normalize tag verification order 2019-11-22 10:59:45 -08:00
dougqh 6b096c2240 Replacing Advice.class references
Replacing Advice.class references with string construction.

This stops the JVM from loading the Advice classes which are used as templates for byte buddy and doesn't ever need to be run directly.

This eliminates ~130 class loads at start-up -- and saves 0.5MiB in metaspace
2019-11-18 16:09:30 -05:00
Nikolay Martynov 17155f7d57 Fix scala warning 2019-11-06 13:58:20 -05:00
Laplie Anderson bf4587c23d Missed a few test helper methods 2019-11-04 12:49:35 -05:00
Nikolay Martynov 92f62ca954 Fix scala warning 2019-11-04 08:22:20 -05:00
Trask Stalnaker 8c558fa00e Format 2019-10-24 21:05:01 -07:00
Trask Stalnaker 86bd9793bd Switch to new Tags class in instrumetation 2019-10-24 21:05:00 -07:00
Trask Stalnaker 9182b64078 Switch to new Tags class in tests 2019-10-24 21:04:57 -07:00
Trask Stalnaker 3b8a514364 Update akka-http-10.0 to new agent api 2019-10-19 16:40:52 -07:00
Tyler Benson 2086664f6d Reduce overhead of URLAsResourceName decorator
Using `new URL()` just to parse the path out was rather expensive.  This should improve the situation.
2019-09-17 18:50:01 -07:00
Tyler Benson cd6dcf393b Apply fixed default operation name for @Trace generated spans
This should help reduce issues with multiple top level spans.
2019-09-05 16:21:27 -07:00
Tyler Benson e74167adf2 Update Play instrumentation to work with 2.7
(Don’t be surprised when things break with 2.8… They’re religious about removing deprecated methods on minor release versions.  If they followed standard convention, they’d likely be on at least 11.x.)

Add client test for 2.4-2.5 http library.  2.6+ won’t work because the underlying frameworks we instrument are shaded.

Also add server tests.  We could do a lot more testing since it seems play still supports using Netty as the backing server even though it’s not the default.  It’s difficult to do extensive testing though because they have so many breaking changes between versions.
2019-08-22 12:43:13 -07:00
Tyler Benson e69edaec14 Remove project config centrally defined and other misc cleanup 2019-08-22 12:43:13 -07:00
Tyler Benson 49249c0c6e Move server field to HttpServerTest 2019-08-07 08:35:18 -07:00
Tyler Benson 668b1059f5 Migrate vertx tests to HttpServerTest 2019-08-05 15:52:04 -07:00
Tyler Benson c5ccc67743 Migrate Akka-Http Server tests and add ignoreParent() 2019-08-05 08:42:46 -07:00
Tyler Benson ea4fc4ab28 Use NoopSpan instead of null for null parent.
Fix some more tests.
2019-07-19 09:26:40 -07:00
David Pratt 681420a004 Remove SuperPool instrumentation.
By definition, a Flow generated by a SuperPool does not respect ordering
of requests and responses, and in fact will typically only rarely actually
behave in the fashion that the instrumentation expects. The previous implementation
would start a span for a given request before submitting it as input to the flow,
and close the span with whatever response is next emitted by the flow. This
request will rarely (if ever) be the actual response for the request that
started the span. For more info, see the official docs at
https://doc.akka.io/docs/akka-http/current/client-side/host-level.html#configuring-a-host-connection-pool

Additionally, compiling this instumentation against scala 2.11, and only
scala 2.11 can (and does) cause significant problems at runtime due to the
fact that Scala is explicitly not binary compatible across major versions.
2019-06-24 11:01:48 -05:00
David Pratt bf7bbf31f8 Fix akka-http instrumentation.
Remove compiled Scala artifacts from the actual instrumentation. Scala
is not binary compatible across major versions, and having
AkkaHttpClientTransformFlow.scala be in the artifact causes problems
when using anything but Scala 2.11.

Having the AkkaHttpClientTransformFlow implementation be in pure java
utilizing the Akka-stream Java DSL ensures that this will work across
any given Scala major version.
2019-06-21 14:51:04 -05:00
Nikolay Martynov f5f3386f79 Make Akka client test more stable
We already have a hack to wait for client span to close after the
request because it is closed on separate thread. This patch extends
that hack to handle cases when original request throws an exception.
2019-06-13 11:51:10 -04:00
Nikolay Martynov eddf5d98d8 Undo akka latest dep hack 2019-06-06 10:05:18 -04:00
Tyler Benson 8016e22bc4 Review changes 2019-05-31 09:07:22 -07:00
Tyler Benson a7c941c2ea More fixes.
Notably added a transformer to make config easier to test with by making INSTANCE public static volatile.
2019-05-29 22:24:19 -07:00
Tyler Benson fc9f1d120c Misc fixes. 2019-05-29 13:54:35 -07:00
Tyler Benson e260b1d044 Make all http client tests extend HttpClientTest
Add flexibility to handle inconsistencies between client integrations.
2019-05-29 13:54:35 -07:00
Tyler Benson 68a68f1057 Ensure that http.url tag doesn’t have query params set
Make handling of it more consistent in decorator.
2019-04-26 09:48:34 -07:00
Tyler Benson b343fe4551 Split peer connection details different generic argument 2019-04-16 08:34:43 -07:00
Tyler Benson bf05984208 Server tags should report peer, not self hostname/port
Previously this was not obvious and incorrect.
2019-04-16 08:21:01 -07:00
Tyler Benson 50279d64fe Span type should only be an attribute and not inherited
Previously we were inheriting from the parent and also often setting as a tag.

Apply default span assertion to verify the spanType is being checked properly. (Include error state too.)
2019-02-28 12:39:51 -08:00
Tyler Benson 1644de3969 Migrate Jax-rs client instrumentation to Decorator 2019-02-27 09:40:08 -08:00
Tyler Benson 93e38f6f0d Rename and static import decorators instance
In the instrumentation it reads better.
2019-02-22 13:44:34 -08:00
Tyler Benson 13e708ec42 Akka and Apache HttpClient migrate to decorators 2019-02-20 17:02:05 -08:00
Nikolay Martynov a46d6a2e8f Use config inheritance in `withConfigOverride`.
This moves us forward to abstract 'Config' and away from depending in
specific config data source (e.g. system properties).
2019-02-05 15:51:05 -05:00
Tyler Benson 12e7efc0b9 Review fixes 2019-02-05 11:58:36 -08:00
Tyler Benson bbcd2f6949 Move other Utils to utils package 2019-02-05 11:43:05 -08:00
Tyler Benson 6aa371d790 Encapsulate config override reflection 2019-02-05 11:30:07 -08:00
Tyler Benson 1a54e8179a Add setting to set service name by domain for http clients
This will allow better metric collection and identification of trends for individual services/hosts.

This is not enabled by default because it can result in a high cardinality of services.
2019-02-05 08:20:49 -08:00
Nikolay Martynov 93b018b4cc Use port 61 for unused port in akka tests
This port is in low range and is not assigned so nothing should really
be listening on it on any host.
2019-01-08 12:04:50 -05:00
Tyler Benson fe52180bfc Apply proper generic signature for Instrumenter.Default transformers()
Previously it was missing the MethodDescription portion.
2019-01-04 15:25:12 -08:00
Nikolay Martynov d02e0d8e47 Fix akka latest dep test failure 2019-01-03 19:13:48 -05:00
Nikolay Martynov be919a0145 Fix Akka 10.1 support 2018-12-28 13:12:33 -05:00
Nikolay Martynov 118a61cc67 Add field backed context provider 2018-11-29 15:18:46 -08:00
Nikolay Martynov b89e73b3c0 Switch executor instrumentation to use context storage 2018-11-29 15:18:46 -08:00
Nikolay Martynov 34372533c1 Add config for tags that propagate to JMXFetch and spans
Also add runtime-id tag to root span and JMXFetch metrics
2018-10-22 15:51:20 -04:00
Tyler Benson 432ce89a07 Add assertTraces to AgentTestRunner with implied argument
This will also help with auto complete when writing tests.
2018-10-15 10:19:00 +10:00
Nikolay Martynov f71192266c Rework the way multi-jvm tests work
To allow some JVMs runs only subset of tests
2018-10-02 13:20:19 -04:00