|
12 | 12 | import kotlin.jvm.functions.Function1; |
13 | 13 | import kotlin.coroutines.Continuation; |
14 | 14 | import java.net.URL; |
| 15 | +import java.util.logging.Level; |
15 | 16 |
|
16 | 17 | @Weave(originalName = "io.ktor.client.request.BuildersJvmKt") |
17 | 18 | public class BuildersJvmKt_Instrumentation { |
18 | 19 |
|
19 | | - @Trace(dispatcher = true) |
| 20 | + @Trace |
20 | 21 | public static Object request(HttpClient client, URL url, Function1<? super HttpRequestBuilder, Unit> function1, Continuation<? super HttpResponse> continuation) { |
21 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
22 | | - traced.setMetricName(new String[] {"Custom","KtorClient","request"}); |
23 | | - traced.addCustomAttribute("Method", "Request"); |
24 | | - traced.addCustomAttribute("URL", url.toString()); |
| 22 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.request({0},{1},{2}",url,function1,continuation); |
25 | 23 | return Weaver.callOriginal(); |
26 | 24 | } |
27 | 25 |
|
28 | | - @Trace(dispatcher = true) |
| 26 | + @Trace |
29 | 27 | public static Object get(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation) { |
30 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
31 | | - traced.setMetricName(new String[] {"Custom","KtorClient","get"}); |
32 | | - traced.addCustomAttribute("Method", "Get"); |
33 | | - traced.addCustomAttribute("URL", url.toString()); |
| 28 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.get({0},{1},{2}",url,function1,continuation); |
34 | 29 | return Weaver.callOriginal(); |
35 | 30 | } |
36 | 31 |
|
37 | | - @Trace(dispatcher = true) |
38 | 32 | public static Object post(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation) { |
39 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
40 | | - traced.setMetricName(new String[] {"Custom","KtorClient","post"}); |
41 | | - traced.addCustomAttribute("Method", "Post"); |
42 | | - traced.addCustomAttribute("URL", url.toString()); |
| 33 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.post({0},{1},{2}",url,function1,continuation); |
43 | 34 | return Weaver.callOriginal(); |
44 | 35 | } |
45 | 36 |
|
46 | | - @Trace(dispatcher = true) |
47 | 37 | public static Object put(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation ) { |
48 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
49 | | - traced.setMetricName(new String[] {"Custom","KtorClient","put"}); |
50 | | - traced.addCustomAttribute("Method", "Put"); |
51 | | - traced.addCustomAttribute("URL", url.toString()); |
| 38 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.put({0},{1},{2}",url,function1,continuation); |
52 | 39 | return Weaver.callOriginal(); |
53 | 40 | } |
54 | 41 |
|
55 | | - @Trace(dispatcher = true) |
56 | 42 | public static Object patch(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation) { |
57 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
58 | | - traced.setMetricName(new String[] {"Custom","KtorClient","patch"}); |
59 | | - traced.addCustomAttribute("Method", "Patch"); |
60 | | - traced.addCustomAttribute("URL", url.toString()); |
| 43 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.patch({0},{1},{2}",url,function1,continuation); |
61 | 44 | return Weaver.callOriginal(); |
62 | 45 | } |
63 | 46 |
|
64 | | - @Trace(dispatcher = true) |
65 | 47 | public static Object options(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation) { |
66 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
67 | | - traced.setMetricName(new String[] {"Custom","KtorClient","options"}); |
68 | | - traced.addCustomAttribute("Method", "Options"); |
69 | | - traced.addCustomAttribute("URL", url.toString()); |
| 48 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.options({0},{1},{2}",url,function1,continuation); |
70 | 49 | return Weaver.callOriginal(); |
71 | 50 | } |
72 | 51 |
|
73 | | - @Trace(dispatcher = true) |
74 | 52 | public static Object head(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation) { |
75 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
76 | | - traced.setMetricName(new String[] {"Custom","KtorClient","head"}); |
77 | | - traced.addCustomAttribute("Method", "Head"); |
78 | | - traced.addCustomAttribute("URL", url.toString()); |
| 53 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.head({0},{1},{2}",url,function1,continuation); |
79 | 54 | return Weaver.callOriginal(); |
80 | 55 | } |
81 | 56 |
|
82 | | - @Trace(dispatcher = true) |
83 | 57 | public static Object delete(HttpClient client, URL url, Function1<? super HttpRequestBuilder, kotlin.Unit> function1, Continuation<? super HttpResponse> continuation) { |
84 | | - TracedMethod traced = NewRelic.getAgent().getTracedMethod(); |
85 | | - traced.setMetricName(new String[] {"Custom","KtorClient","delete"}); |
86 | | - traced.addCustomAttribute("Method", "Delete"); |
87 | | - traced.addCustomAttribute("URL", url.toString()); |
| 58 | + NewRelic.getAgent().getLogger().log(Level.FINE,"Call to BuildersJvmKt.delete({0},{1},{2}",url,function1,continuation); |
88 | 59 | return Weaver.callOriginal(); |
89 | 60 | } |
90 | 61 |
|
|
0 commit comments