Commit Graph

240 Commits

Author SHA1 Message Date
Nikita Salnikov-Tarnovski a48bd9de3f
Move PeerServiceAttributesExtractor from javaagent api to instrumentation api (#4235)
* Move PeerServiceAttributesExtractor from javaagent api to instrumentation api

* spotless
2021-10-06 12:42:55 -07:00
Mateusz Rzeszutek d3dbe415a1
Move HttpHeadersConfig methods back to instrumentation-api (#4298)
* Move HttpHeadersConfig methods back to instrumentation-api

* remove unnecessary method
2021-10-06 10:51:45 +02:00
Nikita Salnikov-Tarnovski c28374615b
Add functionality to generate API changes (#4285)
* Add functionality to generate API changes

* Update conventions/src/main/kotlin/otel.japicmp-conventions.gradle.kts

Co-authored-by: John Watson <jkwatson@gmail.com>

* Do not commit any API changes until we have stable release

Co-authored-by: John Watson <jkwatson@gmail.com>
2021-10-06 09:59:01 +03:00
Mateusz Rzeszutek 66d58aa0a6
Move clientIp extraction to HttpServerAttributesExtractor (#4301)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-10-05 16:08:17 -07:00
Mateusz Rzeszutek 7791be24e0
Remove implementations of host() and userAgent() in HTTP extractors (#4299)
* Remove implementations of host() and userAgent() in HTTP extractors

* fix broken headers copying
2021-10-05 10:25:45 -07:00
Mateusz Rzeszutek 7473eff1e6
Extract HTTP request/response headers as span attributes (#4237)
* Extract HTTP request/response headers as span attributes

* fix muzzle

* code review comments

* fix compilation failure after merge conflict

* avoid using streams API when transforming the headers list

* fix liberty extractor

* fix spring webmvc extractor
2021-10-05 10:20:59 +02:00
Trask Stalnaker dafc97f96e
Simplify gradle files (#4292) 2021-10-04 21:53:35 -07:00
Mateusz Rzeszutek 9d6fb65b41
Remove ContextStore/InstrumentationContext mentions from internal age… (#4267)
* Remove ContextStore/InstrumentationContext mentions from internal agent classes

* Fix internal-reflection module
2021-10-04 09:24:25 -07:00
Trask Stalnaker 506ae2b894
Flavor extractor (#4274) 2021-10-04 09:23:58 -07:00
Trask Stalnaker 92394ad9ae
Remove url from HttpServerAttributesExtractor (#4209)
* Remove url from HttpServerAttributesExtractor

* Remove UriBuilder

* Tracers too

* apache-camel

* Finatra

* jsp

* Ratpack

* Ratpack library

* Ratpack

* Spark

* Feedback

* Fix Undertow

* Vertx

* vertx-web

* play-2.4

* webflux

* jaxrs

* Spotless

* Update semantic-conventions.md

* Update smoke tests

* More realistic target

* Remove outdated doc

* Wording
2021-10-03 09:17:23 -07:00
Mateusz Rzeszutek c421b66d56
Remove unnecessary VirtualField#setIfNull() method (#4262) 2021-10-02 13:17:48 -07:00
Lauri Tulmin 033c20a3d9
Fix flaky StatementSanitizationConfigTest (#4264) 2021-10-02 10:52:03 -07:00
Nikita Salnikov-Tarnovski bfeb482465
Convert Elasticsearch Transport to Instrumenter API (#4252)
* Convert Elasticsearch Transport to Instrumenter API

* Don't set duplicate attributes

* Code review comments
2021-10-01 13:45:29 +03:00
Mateusz Rzeszutek c11b96e4d0
Make it possible to use InstrumentationContext (now VirtualField) fro… (#4218)
* Make it possible to use InstrumentationContext (now VirtualField) from library instrumentation

* fix tests

* fix javadocs

* fix some more tests

* code review comments

* setIfNull, computeIfNull
2021-10-01 11:13:11 +02:00
Martin 95099144ab
add test for StatementSanitizationConfig (#4211)
* add test for StatementSanitizationConfig

* adjust code style
2021-09-30 09:59:16 -07:00
Nikita Salnikov-Tarnovski 5e6bc60dae
Resolve some Gradle warnings (#4234)
* Resolve some Gradle warnings

* spotless
2021-09-29 10:01:48 -07:00
Trask Stalnaker 9ea33edf08
Remove attrs from http client attributes extractor (#4210)
* Remove scheme/host/target from HttpClientAttributesExtractor

* And jaxrs-client

* Remove unused methods
2021-09-28 12:58:42 -07:00
Lauri Tulmin ba3370e054
Build servlet mapping resolver only when needed (#4197)
* Build servlet mapping resolver only when needed

* move factory interface to boot loader to ensure that everybody has the same class for it

* spotless

* Helper classes should not look up ContextStore on each access
2021-09-27 18:04:22 +03:00
Mateusz Rzeszutek a277a8b636
Separate HTTP client/server AttributesExtractors (#4195) 2021-09-24 10:06:23 -07:00
Trask Stalnaker 3ce940548c
Experimental option to suppress messaging receive spans (#4187)
* Experimental option to suppress messaging receive spans

* Kafka streams too

* Better conditionals

* Remove oops

* Extract base class for kafka streams tests

* Spotless
2021-09-22 21:50:05 -07:00
Trask Stalnaker 8066f2787c
Add context customizer hook to Instrumenter API (#4167)
* Add context customizer hook to Instrumenter API

* Use in tomcat instrumentation

* Some of servlet

* Use in rest of servlet

* Feedback
2021-09-22 14:54:04 -07:00
Mateusz Rzeszutek a8b6faf27d
Add start/end time to RequestListener (#4155) 2021-09-21 13:52:05 -07:00
Lauri Tulmin 59439cb464
Make servlet context path key private (#4125)
* Make servlet context path key private

* remove accidentally added files

* fix servlet2.2

* use non capturing lambda

* Update instrumentation/servlet/servlet-common/library/src/main/java/io/opentelemetry/instrumentation/servlet/ServletHttpServerTracer.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* use method reference

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-09-16 10:23:29 -07:00
Anuraag Agrawal 971ca8b19c
Update to OTel 1.6 (#4120)
* Update to OTel 1.6

* Example build

* More example

* More example
2021-09-14 20:12:18 +09:00
Mateusz Rzeszutek 2621ca123e
Make InstrumenterBuilder javadoc about span suppression a bit clearer (#4113)
* Make InstrumenterBuilder javadoc about span suppression a bit clearer

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-13 11:40:31 -07:00
Lauri Tulmin 15277cf8f5
Convert servlet instrumentation to instrumenter api (#4078)
* Convert servlet to instrumenter api

* make classes final

* Remove some tracer files

* remove xxx

* fix liberty and wildfly exception smoke test

* fix async smoke test on liberty

* Apply suggestions from code review

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* generic TextMapGetter for servlets

* not going to use http.route for servlets

* simplify

* add servlet timeout in attribute extractor

* move classes from library to javaagent

* remove unneeded dependency

* make method private

* move helper class initialization to singleton, remove helpers that don't have any methods, add shouldStart checks

* Update instrumentation/servlet/servlet-common/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/servlet/ServletRequestContext.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* add import

* rename methods that start and end spans

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-09-13 10:12:34 -07:00
Matthew Ho 6967484a97
Update groovy import order to match default IntelliJ (#1708) (#4047)
* Update groovy import order to match default IntelliJ (#1708)

* organized imports for .groovy files to follow default IntelliJ import settings

* updated intellij-setup.md

* Spotless

* drift

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-11 11:53:08 -07:00
Mateusz Rzeszutek 05d1a4a54f
Separate suppression strategies for CONSUMER receive/process spans (#4076)
* Separate suppression strategies for CONSUMER receive/process spans

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/SpanKeyExtractor.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* spotless

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-09-10 10:55:50 -07:00
Mateusz Rzeszutek 4820ec4855
Add error parameter to EndTimeExtractor and AttributesExtractor#onEnd() (#3988) 2021-09-08 07:58:13 -07:00
Trask Stalnaker 400d99467a
Follow http.client_ip spec clarification (#4063) 2021-09-08 07:54:59 -07:00
Trask Stalnaker ec99db5e5b
Support empty values in config maps (#4037)
* Support empty values in config maps

* Rename method
2021-09-02 16:00:29 +09:00
Mateusz Rzeszutek 62eae30a60
Make Config behave exactly as SDK DefaultConfigProperties (#4035)
* Make Config behave exactly as SDK DefaultConfigProperties

* errorprone

* errorprone part 2

* errorprone part 3

* fix failing tests
2021-08-31 10:00:04 -07:00
Anuraag Agrawal 96f5708655
Fix parsing of unclean map values in Config. (#4032) 2021-08-31 14:57:55 +09:00
Trask Stalnaker 65335962de
Remove capturing lambda (optimization) (#4014)
* Remove capturing lambda

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/servlet/ServerSpanNameSupplier.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/servlet/ServerSpanNameTwoArgSupplier.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* Update instrumentation/jsf/jsf-common/library/src/main/java/io/opentelemetry/instrumentation/jsf/JsfServerSpanNaming.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>

* checkstyle

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2021-08-30 20:26:00 -07:00
Trask Stalnaker 0f9308b4fb
Optimize tomcat uri construction (#4008)
* Optimize tomcat uri construction

* Add TODO
2021-08-30 13:34:23 -07:00
Trask Stalnaker dc4e239722
Add span names cache (#4004)
* Add span names cache

* Simplify
2021-08-30 09:02:27 -07:00
Mateusz Rzeszutek 4567bc0c2f
Instrument spring-kafka batch message listeners (#3922)
* Instrument spring-kafka batch message listeners

* Update instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/instrumenter/InstrumenterBuilder.java

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>

* fix compilation failure

* Suppress nested CONSUMER spans

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2021-08-27 08:02:37 -07:00
Mateusz Rzeszutek 585cc55921
Add request param to EndTimeExtractor (#3947) 2021-08-27 14:34:47 +02:00
Trask Stalnaker fec5ed2290
Fix metrics cardinality (#3972)
* Fix metrics cardinality

* Add test
2021-08-27 10:45:19 +09:00
Lauri Tulmin b5aec6a2e0
Bridge span keys defined in instrumentation api (#3911) 2021-08-25 20:25:37 -07:00
Trask Stalnaker 6f22d90aa6
Option to suppress controller and view spans (#3865)
* Add option to suppress controller and view spans

* Apply to all existing Instrumenters

* Introduce ExperimentalConfig

* Singleton?

* No need for lazy
2021-08-25 13:43:38 -07:00
Trask Stalnaker 20c72f3e98
Format kotlin gradle files (#3942)
* Add ktlint for kotlinGradle

* ktlint fails on wildcard imports

* Auto-format kotlin gradle files
2021-08-25 13:43:57 +09:00
Mateusz Rzeszutek 5c71d28ed7
Remove deprecated Config methods (#3908) 2021-08-23 16:44:54 -07:00
jason plumb 0255e8e95f
Add NamingConventionTest (#3814)
* verify some behaviors of the NamingConvention class.

* document that system property hyphens and underscores don't actually normalize the same

* spotless
2021-08-20 13:50:53 -07:00
Mateusz Rzeszutek 8200319d2a
Rename Config get*Property() methods to get*() (#3881) 2021-08-20 09:32:41 -07:00
Mateusz Rzeszutek ca8a119e01
Don't pass configuration to SDK autoconfigure through system props (#3866)
* Don't pass configuration to SDK autoconfigure through system props

* suppress CanonicalDuration

* checkstyle
2021-08-19 16:56:12 -07:00
Anuraag Agrawal d8eae4997d
Update to SDK 1.5.0 (#3847) 2021-08-17 08:43:11 -07:00
Liudmila Molkova 080c85df85
Client span keys: suppressing same instrumentation (#3691) 2021-08-14 13:44:46 -07:00
Mateusz Rzeszutek 92a69c3309
Simplify shouldStart() check for SERVER & CONSUMER spans (#3771) 2021-08-10 21:00:34 -07:00
Mateusz Rzeszutek beab394960
Add a few missing @Nullables in instrumentation-api (#3806) 2021-08-10 16:46:35 +02:00