Commit Graph

846 Commits

Author SHA1 Message Date
Lauri Tulmin 8bb279f21e
Fix spring kafka interceptor wrappers not delegating some methods (#10935) 2024-03-25 17:20:54 -07:00
Lauri Tulmin 4c45e94098
Handle async requests in srping mvc library instrumentation (#10868) 2024-03-20 14:04:53 +02:00
Gregor Zeitlinger 3839342e3b
move spring resources to javaagent directory (#10813) 2024-03-14 08:27:19 -07:00
Gregor Zeitlinger b7e847c4f1
Spring use sdk autoconfig (#10453) 2024-03-13 07:41:47 -07:00
Lauri Tulmin afa3207e87
Fix spring kafka context leak when batch listener is retried (#10741) 2024-03-12 14:03:29 +02:00
Lauri Tulmin fa5548b9a5
Fix spring boot starter failing without logback (#10802) 2024-03-12 10:01:45 +02:00
Gregor Zeitlinger c73bf8eadf
Fix native tests (#10685)
Co-authored-by: Jean Bisutti <jean.bisutti@gmail.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <tulmin@gmail.com>
2024-02-28 19:08:07 -08:00
Jean Bisutti edf64c5b31
Ability to disable the automatic Logback appender addition (#10629) 2024-02-26 15:22:08 +02:00
Gregor Zeitlinger 4ed5adeb17
don't fail spring application startup if sdk is disabled (#10602) 2024-02-22 14:16:09 +02:00
Lauri Tulmin b5bbc62fa1
Always create a JMS consumer span (#10604) 2024-02-22 09:13:25 +02:00
Gregor Zeitlinger 1cd768e294
spring boot starter: add service.version detection, improve service.name detection (#10457) 2024-02-21 12:46:58 -08:00
Gregor Zeitlinger ee9cdc3800
add in starter: annotations (#10613) 2024-02-21 16:08:21 +02:00
Gregor Zeitlinger d8aa0f5b48
Remove deprecated spring properties (#10454) 2024-02-16 08:27:26 -08:00
Gregor Zeitlinger 66dd60015c
fix otel.properties in spring boot starter (#10559) 2024-02-15 12:11:11 -08:00
Lauri Tulmin 37b145b81c
Remove disabling spring-boot-autoconfigure tests on openj9 18 (#10551) 2024-02-14 08:40:24 -08:00
Gregor Zeitlinger 76ab93780e
Spring starter should support otel.propagators (#10408) 2024-02-13 10:02:07 -08:00
Jay DeLuca b43fbea416
Update Spring autoconfigure and zipkin starter readmes to link to doc site (#10531) 2024-02-13 08:32:16 -08:00
Gregor Zeitlinger 485b8f4218
use duration parser of config properties for consistency (#10512) 2024-02-13 08:30:27 -08:00
Gregor Zeitlinger d73304b078
remove support for deprecated @WithSpan annotation from spring starter (#10530) 2024-02-13 08:27:08 -08:00
Steve Rao 0a5c31193c
Deleted redundant checks (#10434) 2024-02-07 07:30:52 -08:00
Gregor Zeitlinger 29354a7ba6
add SystemOutLogRecordExporter for spring starter (#10420) 2024-02-06 07:50:27 -08:00
Lauri Tulmin acb078bbc3
Wrap request to avoid modifying attributes of the original request (#10389) 2024-02-06 08:44:02 +02:00
Gregor Zeitlinger f715a189bf
re-use sdk logic for configuring otlp exporters (#10292)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-02-05 20:44:37 -08:00
Trask Stalnaker d4435c9bc8
Use direct peer address in `client.address` when X-Forwarded-For is not present (#10370)
Co-authored-by: heyams <heya@microsoft.com>
2024-02-05 19:09:28 -08:00
Lauri Tulmin e47be09fbd
Disable actuator instrumentation by default (#10394) 2024-02-03 08:48:40 +00:00
Jean Bisutti 80e5bac4a4
Allow the Spring starter to configure the OTel Logback appender from system properties (#10355) 2024-02-02 17:27:58 +00:00
Gregor Zeitlinger bb8e301111
fix MapConverter bean condition (#10346) 2024-01-31 19:33:47 -08:00
Gregor Zeitlinger 5969622052
add resource detectors to spring starter (#10277) 2024-01-31 17:21:34 +02:00
Lauri Tulmin b57c1a023b
Update semconv (#10272) 2024-01-30 17:10:35 +00:00
Gregor Zeitlinger 2e5ac56213
add LoggingMetricExporterAutoConfiguration to spring factories (#10282) 2024-01-30 13:45:39 +02:00
Jean Bisutti 8825359748
Automatic addition of the OTel Logback appender by the OTel starter (#10306) 2024-01-24 08:45:13 -08:00
Lauri Tulmin 9259ce828a
Add context propagation for rector schedulers (#10311) 2024-01-24 09:11:47 +02:00
Lauri Tulmin 87f6be691e
Use constants from SemanticAttributes (#10302) 2024-01-23 08:05:42 -08:00
Gregor Zeitlinger 9c8644c874
add Spring boot distro version (#10276) 2024-01-23 10:37:04 +02:00
Gregor Zeitlinger 3b65ee1a32
add @ConditionalOnMissingBean to LoggingMetricExporter (#10283) 2024-01-19 11:33:37 +02:00
Lauri Tulmin 61e29873ee
Fix Calling shutdown() multiple times warning in spring starter (#10222) 2024-01-18 10:20:35 -08:00
Lauri Tulmin d36d7df184
Remove jaeger exporter and add api diff for 2.0.0 release (#10241) 2024-01-16 20:54:09 +02:00
Lauri Tulmin c418b14914
Don't append signal path to signal specific endpoint (#10214) 2024-01-12 09:14:37 -08:00
Jean Bisutti 32ea07c1bc
Change Spring starter default otlp protocol from gRPC to http/protobuf (#10212) 2024-01-11 13:09:17 -08:00
Lauri Tulmin 3dd0925081
Honor default enabled for instrumentation modules (#10211) 2024-01-11 07:49:51 -08:00
Lauri Tulmin 6ce3bd8c14
Add network attributes to rabbitmq process spans (#10210) 2024-01-11 07:49:03 -08:00
Lauri Tulmin 78648478ae
Disable springws instrumentation when controller telemetry is not enabled (#10192) 2024-01-09 14:38:00 -08:00
Helen fdeb032b33
Disable controller and view spans by default (#10042)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-01-04 09:16:46 -08:00
Lauri Tulmin 27615c5690
Document spring-batch and spring-scheduling flags (#10155) 2024-01-03 10:49:28 -08:00
moznion c66c59a5b8
Resolve `ParameterNameDiscoverer` Bean Conflict in `spring-boot-autoconfigure` (#10105)
Signed-off-by: moznion <moznion@mail.moznion.net>
2024-01-02 14:51:07 -08:00
Lauri Tulmin 4ac62380d5
Replace OpenTelemetrySupplier with ObjectProvider<OpenTelemetry> (#10145) 2024-01-01 17:38:49 -08:00
Lauri Tulmin 04da58e5e4
Fix warnings from the spring boot starter (#10086) 2023-12-22 11:00:01 +02:00
Lauri Tulmin a2d4148067
Remove http stable semconv tests (#10087) 2023-12-21 08:30:26 -08:00
Gregor Zeitlinger 87615cc9d9
add support for OTEL_RESOURCE_ATTRIBUTES, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_HEADERS and OTEL_EXPORTER_OTLP_PROTOCOL for spring boot starter (#9950) 2023-12-21 08:23:48 -08:00
Vallabh Natu 818ff6fcbe
Convert Spring Scheduling groovy tests to java (#9806)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-12-21 16:34:33 +02:00
Lauri Tulmin ad16ba88b2
Fix using opentelemetry-spring-boot with java8 (#10066) 2023-12-13 10:24:52 -08:00
Gregor Zeitlinger 3213c86784
Breaking change: disable micrometer bridge by default (#10038) 2023-12-12 11:47:55 -08:00
Lauri Tulmin 65b9fa2712
Fix spring-cloud-gateway-2.2 latest dep tests (#10023) 2023-12-07 12:05:38 +01:00
Mateusz Rzeszutek 1ac8c4d606
Implement `error.type` in `spring-webflux` and `reactor-netty` instrumentations (#9967) 2023-12-05 12:27:09 +00:00
Jean Bisutti df8b334ccf
Fix NoSuchBeanDefinitionException with the JDBC driver configuration (#9978) 2023-12-04 11:19:02 -08:00
Mateusz Rzeszutek 65ee9510f5
Rename the `instrumentation-api-semconv` module into `instrumentation-api-incubator` (#9985) 2023-12-04 08:28:10 +01:00
Mateusz Rzeszutek dc81aae72f
Move HTTP classes to instrumentation-api (#9977) 2023-12-01 12:04:06 +01:00
Mateusz Rzeszutek 280c1ea4c1
Enable stable HTTP semconv by default (#9925) 2023-11-28 10:43:51 -08:00
Jean Bisutti 00b6398cd7
Point the OpenTelemetry Spring Starter doc to opentelemetry.io website (#9926) 2023-11-27 09:20:59 -08:00
Mateusz Rzeszutek 63468157fc
Fix latest dep tests after the recent Spring release (#9947) 2023-11-24 21:07:48 +00:00
Lauri Tulmin d4e6078cfe
Fix aws propagator presence check (#9924) 2023-11-22 10:03:00 +02:00
Lauri Tulmin 672fa2215f
Fix link to spring integration channel configuration doc (#9931) 2023-11-22 08:50:36 +01:00
Lauri Tulmin e148b84536
Fix spring-kafka-2.7 latest dep tests (#9921) 2023-11-21 11:59:18 +01:00
Lauri Tulmin 6313391d71
Rewrite @Advice.Enter for indy advice (#9887) 2023-11-17 07:49:19 -08:00
Lauri Tulmin dedfc204c1
Fix latest dep tests (#9892) 2023-11-16 10:12:24 -08:00
Phil Clay 6ed32390bc
Capture enduser attributes in Spring Security (#9777) 2023-11-14 12:23:09 -08:00
Lauri Tulmin 23b2521c43
Remove reference to tracer bean from spring boot docs (#9864) 2023-11-14 07:15:45 -08:00
Trask Stalnaker 5ba402fd2f
opentelemetry -> openTelemetry (#9858) 2023-11-14 12:31:42 +02:00
AlchemyDing 8c6f4b06a7
Add the situation of specifying spring.application.name in the bootstrap file after introducing spring cloud (#9801) 2023-11-06 09:44:44 -08:00
Jonas Kunz 6eb8ae19df
Allow injection of helper bytecode as resources (#9752) 2023-11-06 09:37:52 -08:00
Lauri Tulmin f811bf6840
Second attempt at fixing flaky spring rabbit test (#9809) 2023-11-06 16:50:16 +02:00
Lauri Tulmin 70e3962a87
Always set messaging operation (#9791) 2023-11-06 12:30:27 +02:00
Liu Ziming 702ae30076
feat: get route info in spring-cloud-gateway (#9597) 2023-11-03 09:40:35 -07:00
Lauri Tulmin bf931abe74
Fix flaky spring webflux test (#9802) 2023-11-02 13:30:03 -07:00
Mateusz Rzeszutek d6c2aff7c2
Change `http.request.body.size` and `http.response.body.size` attributes from recommended to opt-in (#9799) 2023-11-02 11:20:50 -07:00
Lauri Tulmin a1b849e168
Fix flaky spring rabbit test (#9795) 2023-11-02 08:42:22 -07:00
Mateusz Rzeszutek 96d59d5539
Refactor HTTP server `server.address` and `server.port` attributes (#9760) 2023-10-30 08:55:30 +01:00
Jean Bisutti e6ec4f52ef
Make the JDBC driver config work with the OTel starter (#9625)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-10-23 09:59:36 -07:00
Mateusz Rzeszutek e9026cd591
Deprecate old server/client socket getter methods (#9716) 2023-10-19 17:36:57 +02:00
Mateusz Rzeszutek 9cb157492c
Replace `(client|server).socket.(address|port)` attributes with `network.(peer|local).(address|port)` (#9676) 2023-10-18 10:36:32 +00:00
Liu Ziming 3b08db75cd
convert spring-webflux groovy test to java (#9677)
Co-authored-by: Jean Bisutti <jean.bisutti@gmail.com>
2023-10-17 07:10:40 -07:00
Lauri Tulmin e7db2c0246
Allow enabling receive telemetry in kafka library instrumentation (#9693) 2023-10-17 15:47:11 +02:00
Liu Ziming 48a19d7e54
fix typo in SprintJpaTest (#9678) 2023-10-13 09:35:20 -07:00
Matthieu MOREL 9a1c178d58
PeerService Resolver (#9061)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: jason plumb <75337021+breedx-splk@users.noreply.github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-10-12 07:52:05 -07:00
Lauri Tulmin de7cdcc22b
Run tests with java 21 (#9620) 2023-10-09 17:07:46 +03:00
Lauri Tulmin 553eaa576c
Spring webflux: add user spans as children of the controller span (#9572) 2023-09-28 21:25:34 +03:00
Lauri Tulmin b464369253
Improve spring data reactive instrumentation (#9561) 2023-09-27 21:16:04 +03:00
Lauri Tulmin 7d2259742a
Transform inline advice to delegating advice and test indy modules (#9508) 2023-09-22 11:15:39 +03:00
Hayanesh e73118b434
Add Spring Boot service version finder / ResourceProvider (#9480) 2023-09-21 17:37:08 +02:00
Mateusz Rzeszutek d6c6e8a110
Support application.yaml files in SpringBootServiceNameDetector (#9515) 2023-09-21 15:33:10 +03:00
Mateusz Rzeszutek 3136916749
Add HTTP server tests for non standard methods (#9446) 2023-09-15 08:43:36 -07:00
Lauri Tulmin 913bebb979
Fix deprecated buildDir warning in gradle scripts (#9472) 2023-09-15 08:43:57 +02:00
Trask Stalnaker 3b77cc4b2d
Semconv 1.21 (#9408)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-09-13 19:20:23 +00:00
Lauri Tulmin d157b68efb
Use HTTP instead of non-known method in http span name (#9441)
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-09-13 10:14:30 -07:00
Lauri Tulmin f7128b0d59
Add null check (#9434) 2023-09-11 09:00:38 -07:00
Trask Stalnaker cc4e1bf1ae
Update semconv to 1.21.0, PART 2 - HTTP (#9372) 2023-09-07 08:25:23 -07:00
Lauri Tulmin 323be549f5
Pin hibernate version in spring data latest dep tests (#9366) 2023-09-01 08:55:10 +02:00
Mateusz Rzeszutek 133de2486a
Extract HTTP server experimental metrics to a separate class (#9259) 2023-08-30 08:49:42 -07:00
Mateusz Rzeszutek d7a34f90ba
Refactor and rename `HttpClientResend` and `HttpRouteHolder` (#9280)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-08-26 00:37:25 +00:00
Lauri Tulmin 88961cc8ad
Remove outdated spring documentation (#9248) 2023-08-18 08:18:20 -07:00
Lauri Tulmin 23c20dadaf
Add http client test with non-standard request method (#9204) 2023-08-18 09:01:53 +03:00
Trask Stalnaker d9f7cde77d
Remove outdated spring starter doc (#9205) 2023-08-15 16:23:16 +00:00
Lauri Tulmin 7e7d7ca866
Set http client read timeout only for the read timeout test (#9194) 2023-08-15 09:25:46 +03:00
Lauri Tulmin b9e459da07
Test http client stable semconv (#9178) 2023-08-13 10:22:04 -07:00
Trask Stalnaker 849e0d5229
Combine two netty context attributes into one (#9160) 2023-08-10 13:39:25 +03:00
Lauri Tulmin fc9229334f
Fix link do spring-integration docs (#9174) 2023-08-10 10:21:20 +02:00
Lauri Tulmin bf000fef98
Netty 4.1: handle closing connection before the request completes (#9157) 2023-08-09 18:05:42 +03:00
Mateusz Rzeszutek 27faf8f5b7
Make `HttpServerAttributesGetter` extend `NetServerAttributesGetter` (#9088) 2023-08-02 08:52:44 -07:00
Mateusz Rzeszutek d81630331b
Make `HttpClientAttributesGetter` extend `NetClientAttributesGetter` (#9015) 2023-07-31 11:09:09 -07:00
Mateusz Rzeszutek cabf0dfdf4
Refactor setKnownMethods() in HTTP instrumentations to avoid nullable… (#8994) 2023-07-23 20:03:14 -07:00
Lauri Tulmin bd8ddf4db3
Allow overriding span name in spring web library instrumentation (#8933) 2023-07-21 13:45:05 +02:00
Mateusz Rzeszutek fd8e361e6c
Refactor Spring starter's instrumentation auto configuration classes (#8950)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-07-21 11:35:41 +00:00
Mateusz Rzeszutek 6e573289ae
Replace NetAttributes with SemanticAttributes (#8992) 2023-07-21 11:27:54 +02:00
Trask Stalnaker aabd14fb6e
Apply Prettier to yaml files (#8969) 2023-07-20 02:54:31 +00:00
Trask Stalnaker 2bdddafdc4
Apply Prettier to markdown files (#8968) 2023-07-19 12:22:35 -07:00
Mateusz Rzeszutek 59e2da5aa3
Extract HTTP client experimental metrics to a separate class (#8769) 2023-07-18 08:34:39 -07:00
Mateusz Rzeszutek cc8160cffb
Support the `http.request.method_original` attribute (#8779) 2023-07-17 09:41:41 +00:00
Mateusz Rzeszutek 6f745e8f53
Include OTel appenders in the Spring Starter (#8945) 2023-07-13 12:56:56 +00:00
jason plumb 55368a52d7
Rename messaging operation "send" to "publish" per spec (#8929)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-07-12 08:59:38 -07:00
Mateusz Rzeszutek 8815952300
Initialize appenders in the spring boot starter (#8888)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-07-11 08:47:01 -07:00
OpenTelemetry Bot acbab58a46
Update the OpenTelemetry SDK version to 1.28.0 (#8897)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-07-10 12:45:01 -07:00
Mateusz Rzeszutek 029e187281
Refactor the `FallbackNamePortGetter` in preparation for `client.port` (#8865) 2023-07-05 10:10:05 -07:00
Steven Swartz 15337549e3
Adds spring-data test verifying error spans on JPA repository query failures (#8857) 2023-07-05 09:34:22 +02:00
Lauri Tulmin f2799056f3
Correct class name in javadoc code snippet (#8840) 2023-06-30 08:17:33 -07:00
Abhinandan Seshadri f25cd6354c
Convert spring rabbitmq tests from groovy to java (#8765)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
Co-authored-by: SylvainJuge <763082+SylvainJuge@users.noreply.github.com>
Co-authored-by: Christian Neumüller <christian.neumueller@dynatrace.com>
2023-06-28 10:51:27 +02:00
Mateusz Rzeszutek 4f12fba9c3
Implement new stable client semantic conventions (#8704) 2023-06-13 17:00:27 -07:00
Mateusz Rzeszutek cde2e70148
Implement new stable server semantic conventions (#8663) 2023-06-13 11:07:59 +02:00
OpenTelemetry Bot bbb05276be
Update the OpenTelemetry SDK version to 1.27.0 (#8688)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-06-13 12:02:11 +03:00
Mateusz Rzeszutek 506ccb6b7d
Implement new stable network semantic conventions (#8616) 2023-06-12 16:51:47 +02:00
Mateusz Rzeszutek 188d4c249a
Only instrument the actual Spring `TaskScheduler` implementations (#8676) 2023-06-12 08:01:29 +00:00
Mateusz Rzeszutek 5b03ae655f
Implement new stable HTTP semantic conventions (#8632) 2023-06-08 20:02:45 -07:00
Mateusz Rzeszutek 6b285b0df3
Use "micrometer" instrumentation name in the Spring Actuator instrume… (#8677) 2023-06-08 07:28:06 -07:00
Jean Bisutti 84a818794b
OTLP log export for the OpenTelemetry Spring Starter (#8493)
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-06-07 17:06:34 -07:00
Mateusz Rzeszutek 1263e47ec2
Fix JMS tests by disabling ActiveMQ Artemis persistence (2nd try) (#8667) 2023-06-07 16:58:44 +02:00
Mateusz Rzeszutek 7b0918ef18
Fix JMS tests by disabling ActiveMQ Artemis persistence (#8666) 2023-06-07 14:48:45 +02:00
Mateusz Rzeszutek 8ee63d4441
Implement new stable URL semantic conventions (#8491) 2023-06-05 15:22:22 +00:00
Mateusz Rzeszutek c74fa61b5d
Add wait strategy to the artemis container in spring jms 6 tests (#8646) 2023-06-05 11:07:01 +02:00
Lauri Tulmin fa5d1744ed
Enable http pipelining test on spring webflux (#8501) 2023-06-02 18:35:00 +03:00
Lauri Tulmin 0ea2d7b8d8
Fix flaky spring rabbit test (#8631) 2023-06-01 17:23:21 +02:00
Mateusz Rzeszutek 2c06c00c58
Support otel.sdk.disabled in the spring boot starter (#8602) 2023-06-01 10:48:06 +02:00
Mateusz Rzeszutek c4ee60dad4
Deprecate InetSocketAddressNetServerAttributesGetter and move its met… (#8341) 2023-05-29 10:04:32 +02:00
Lauri Tulmin d8da949f09
Remove usages of classes shaded in testcontainers from tests (#8551)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-05-23 18:38:52 +00:00
Mateusz Rzeszutek c10108bbe0
Enable HTTP client read timeout tests by default (#8530) 2023-05-19 10:24:49 -07:00
Kevin Loveland 233ca9111d
feat: Added Spring's configuration annotation processor to produce th… (#8516) 2023-05-18 14:06:50 +03:00
Mateusz Rzeszutek 8ba8082f44
Refactor resend/redirect tests in AbstractHttpClientTest so that they… (#8500) 2023-05-16 12:13:40 -07:00
Mateusz Rzeszutek 48f85fb5f2
Replace target with path and query in HttpServerAttributesGetter (#8382) 2023-05-11 12:47:00 -07:00
Mateusz Rzeszutek d4c5164809
Add classLoaderMatcher() for Spring WebMVC instrumentations (#8463) 2023-05-11 10:10:51 +02:00
dependabot[bot] 3122897b2e
Bump errorProneVersion from 2.18.0 to 2.19.0 (#8459)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-05-10 09:49:55 -07:00
Trask Stalnaker b09bddd6e4
Update gradle to 8.1.1 (#8433) 2023-05-07 09:28:30 +03:00
Lauri Tulmin 413890d246
Test http pipelining (#8403) 2023-05-04 10:23:48 +03:00
Helen 6295c67def
Fix a todo (#8343) 2023-04-24 20:49:30 -07:00
siyuniu-ms e87584fac6
change endpoint from enum to regular class (#8325)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-04-24 16:31:32 +00:00
sfriberg d1b7356ffe
AddingSpanAttributes annotation (#7787)
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-04-24 08:58:28 -07:00
Lauri Tulmin 0f258c669a
Use hasAttributesSatisfyingExactly instead of hasAttributesSatisfying (#8336) 2023-04-24 11:57:45 +02:00
Helen ffb63d68eb
Fix nested http.route (#8282)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-04-21 09:27:28 +02:00
Mateusz Rzeszutek e3944a53a5
Make net.transport an optional attribute (#8279) 2023-04-20 08:14:03 -07:00
OpenTelemetry Bot 22df5866b0
Update the OpenTelemetry SDK version to 1.25.0 (#8262)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-10 18:12:57 -07:00
Mateusz Rzeszutek 5b271c4917
Switch from http.flavor to net.protocol.* in HTTP server instrumentat… (#8244) 2023-04-09 08:47:33 -07:00
Mateusz Rzeszutek f501569106
Switch from http.flavor to net.protocol.* in HTTP client instrumentat… (#8131) 2023-04-07 13:39:42 +02:00
Lauri Tulmin 1cd634b341
Replace deprecated method (#8230) 2023-04-06 14:43:36 -07:00
Lauri Tulmin 7c9cf7ab1b
Spring scheduling: run error handler with the same context as task (#8220) 2023-04-06 08:39:33 -07:00
Andrei Chugunov 506ca93699
webflux 5.0 groovy to java tests part 2 (#7776)
@trask @mateuszrzeszutek hello, what do you think about
SingleThreadedSpringWebfluxTest, the test contains dependencies on new
reactor netty classes in testLatestDeps case. I tried use reflection for
rewriting the test to java but it was not trivial and I not reach the
result

---------

Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-05 19:33:23 -07:00
Mateusz Rzeszutek 46e5219f19
Remove some Optional usages (#8190)
I applied [this
comment](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/8131#discussion_r1151076724)
to the whole codebase and removed some `Optional`s that were used in the
hot path
2023-04-03 09:13:59 +02:00
adamleantech d6271cccc7
Spring boot service name (#8006)
resolves #7998

---------

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-04-01 18:58:43 -07:00
Lauri Tulmin a9fa5aacea
Add testcontainersBuildService to spring kafka tests that don't have it (#8186) 2023-03-31 10:26:06 +02:00
Lauri Tulmin d8b0771929
Use the same kafka docker image in all kafka tests (#8187)
currently we use `confluentinc/cp-kafka:5.4.3` and
`confluentinc/cp-kafka:6.1.9`
2023-03-31 10:25:38 +02:00
Abhinandan Seshadri b23af1bcfe
Convert spring-core tests from groovy to java (#8166)
Related to #7195.

Converts spring core instrumentation tests from groovy to java.

---------

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-03-31 10:09:31 +02:00
Lauri Tulmin d24d7986ad
Make spring boot service name detector handle BOOT-INF/classes (#8101)
When spring boot application is packaged in one jar
`application.properties` and `application.yml` are under
`BOOT-INF/classes/`.
2023-03-28 12:32:40 +02:00
Abhinandan Seshadri aa2c2436c2
Convert spring-data tests from groovy to java (#8124)
Related to #7195.

Converts spring data instrumentation tests from groovy to java.
2023-03-27 13:58:15 +02:00
Lauri Tulmin bd3117b165
Fix flaky spring rabbit test (#8015)
https://ge.opentelemetry.io/scans/tests?search.buildOutcome=success&search.relativeStartTime=P28D&search.tags=CI&search.timeZoneId=Europe/Tallinn&tests.container=ContextPropagationTest&tests.sortField=FLAKY&tests.test=should%20propagate%20context%20to%20consumer%2C%20test%20headers:%20true&tests.unstableOnly=true
On jdk8 we can have 2 spans starting on the same millisecond.
2023-03-23 13:50:55 +02:00
Lauri Tulmin 4a87d6b0fd
Remove reference to Tracer bean from javadoc (#8104) 2023-03-22 12:59:51 +01:00
Lauri Tulmin 2cbfec8ac2
Fix spring boot 3 webmvc autoconfiguration (#8051)
Related to
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/8028#issuecomment-1466496896
spring boot 3 uses `jakarta.servlet` so we need to use
`WebMvcFilterAutoConfigurationSpring6 ` instead of
`WebMvcFilterAutoConfiguration`
2023-03-14 12:39:58 +01:00
Jean Bisutti 2bd2bbcdee
Make the Spring autoconfiguration work with Spring Boot 3 (#8028)
This PR makes the Spring autoconfiguration work from Spring Boot 2.7.

[The way to declare autoconfiguration has indeed changed from Spring
Boot
2.7](https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#building-jars-with-maven-shade-plugin-and-gradle-shadow-plugin).

A workaround is to use @EnableOpenTelemetry.
2023-03-13 17:15:19 +01:00
Lauri Tulmin a793c247e6
Remove duplicate -Xmx from kafka memory options (#8022) 2023-03-09 22:02:33 +02:00
Lauri Tulmin 67b6b6cc7c
Limit kafka memory usage (#8018) 2023-03-09 16:37:09 +02:00
Mateusz Rzeszutek 1649a90e29
Add protocol name&version to net attribute getters (#7994)
In preparation for
https://github.com/open-telemetry/opentelemetry-specification/pull/3272
2023-03-09 11:37:52 +00:00
Mateusz Rzeszutek 998e781009
Remove deprecated messaging.url attribute from messaging getter (#8008) 2023-03-09 11:41:51 +01:00
James Moessis 3f45f755a9
Spring Webflux Library Instrumentation (#7899)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7436

* Created new Module `spring-webflux-5.3` which contains only
server-side library instrumentation
* Minimum supported version is 5.3 because there are various problems in
older versions of reactor and webflux that prevent a few of the tests
from passing.
* Moved existing `spring-webflux-5.0` (webclient instrumentation) into a
common `spring-webflux` folder next to the 5.3 (server) instrumentation.
Moved the README to the parent folder so the docs are cohesive between
client/server instrumentation.
* Implemented `WebFilter` which instruments the server-side 
* Depends on the `reactor-3.1` instrumentation to pass the context
around. Registers the react hook when it creates the `WebFilter`
* Tests using the standard HTTP server test suite

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-03-08 08:43:46 +01:00
Lauri Tulmin a51535d08e
Test http client captured headers (#7993) 2023-03-07 20:05:29 +02:00
Lauri Tulmin c721852d5f
Convert spring-jms tests to test suites (#7945)
Part of
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7911
2023-03-01 11:24:04 -08:00
Lauri Tulmin 85c541ef92
Implement kafka client id and consumer id attributes (#7860)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7771
Adds `messaging.consumer_id` and `messaging.kafka.client_id` attributes
to kafka spans.
2023-02-21 07:31:28 -08:00
Mateusz Rzeszutek 12ea869855
Implement `messaging.kafka.*` attributes spec (part 1) (#7824)
Part 1 of #7771

It's a lot more than I initially expected it to be; I'll introduce the
clientId attribute in part 2
2023-02-16 13:22:17 -08:00
Mateusz Rzeszutek d9b0eee503
Remove deprecated instrumentation-api-semconv code (#7838) 2023-02-16 13:16:52 -08:00
Mateusz Rzeszutek 4fd52c5a7c
Encode version in library instrumentations' package names (#7764)
Another part of #932

In this PR I changed all the library instrumentation packages -- these
are breaking changes, so I figured the earlier we do this the less
painful it'll be to the users. I know that at least some of them are
actively used, so we'll need to spell this out in the release notes.

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-02-14 23:25:59 +00:00
Mateusz Rzeszutek ea237e3a80
Update HTTP span name extractors (#7730)
Implements
https://github.com/open-telemetry/opentelemetry-specification/issues/2998

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-02-14 07:40:05 -08:00
OpenTelemetry Bot f074b93110
Update the OpenTelemetry SDK version to 1.23.0 (#7800)
Update the OpenTelemetry SDK version to `1.23.0`.

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-02-13 20:22:09 +00:00
Helen c61996f5a4
Change Spring Scheduling to not capture span for one-time jobs (only repeated jobs) (#7760)
We are seeing examples where Spring Scheduling INTERNAL spans are
created inside of an existing parent span, which creates unnecessary
noise.

And these spans don't necessary make sense as these are not "background
jobs" (since they occur inside of an existing span).

(see for example
https://github.com/microsoft/ApplicationInsights-Java/issues/2870)

This PR changes Spring Scheduling instrumentation to only instrumenting
repeating jobs, not one-time scheduled jobs (which corresponds to
ScheduledExecutorService behavior where context is not propagated to
runnable)

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-02-13 12:05:06 -08:00
Lauri Tulmin 54d7241c05
Fix autoconfigure for spring boot 3 (#7784)
See
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7312
2023-02-13 10:45:23 +01:00
Lauri Tulmin c5649cc987
Document spring-rmi latest dep limit (#7774) 2023-02-09 17:07:24 +01:00
Trask Stalnaker 7993ef2433
Fix intellij warnings (#7734) 2023-02-06 09:21:30 +01:00
Mateusz Rzeszutek a9c065930d
Return interface instead of concrete implementation in instrumentatio… (#7658)
…n-api-semconv

We're already doing that for `SpanNameExtractor`, `OperationMetrics`,
`ContextCustomizer`, etc., so I figured we should do the same for
`AttributesExtractor` implementation. Also, none of the implementations
have any additional public surface - aside from the builder/factory
method users can just simply use the interface everywhere.
2023-01-31 13:21:28 +01:00
jason plumb db6b764421
More HTTP testing refactor prework (#7630)
This is another follow-up from #7616. This makes the test options class
immutable and uses `@AutoValue` and `@AutoValue.Builder`. As a result, a
bunch of the configuration/setup code for these said options now flings
around a builder instance. This isn't great, but I think it's an
incremental improvement that can be seen in the `@BeforeAll
AbstractHttpClientTest.setupOptions()` method, where the immutable
options are (finally) instantiated.
2023-01-23 09:42:32 -08:00
Mateusz Rzeszutek e1895e548c
Rename all methods in all Getters to use the `get*()` naming scheme (#7619)
Resolves #6562

This PR only contains renames; the actual content is in the `*Getter`
interfaces, the rest of changes is just IntelliJ doing its job.
2023-01-23 09:28:11 +00:00
Andrei Chugunov 9f9d6fee95
webflux 5.0 groovy to java tests part 1 (#7625)
I decided splitting changes on different PRs due to there are a lot of
lines of code in tests here and it should simplify review process.

Another option is I can add additional commit to this PR with conversion
of other groovy files.
2023-01-23 08:59:19 +01:00
jason plumb c5e384fe9f
Http testing refactor prework (#7623)
As part of discussions #7616, the idea of trying to do a more piecemeal
approach came up. A reasonable ask.

This is the first step in refactoring the http client tests. It factors
out the `HttpClientResult` inner class of the `AbstractHttpClientTest`
so that this can be reused by new test framework later. It also factors
the relevant abstract methods in the abstract class to a new type
adapter, which will also be reused.

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-01-20 18:20:42 +00:00
Alex Kats eaac709162
Update SQL span name for procedures (#7557)
This PR includes updates to the SQLSanitizer, DbClientSpanNameExtractor
and SqlStatementInfo to name spans according to procedure name for CALL
statements. The updates to the naming logic are in the SqlSanitizer and
table has been renamed to identifier as using the table variable for the
procedure name would not be idiomatic. SqlStatementInfo has been updated
so that the db.sql.table attribute is not included for procedures.
2023-01-19 11:01:36 -08:00
Mateusz Rzeszutek 268165c668
Fix NoClassDefFoundError happening when snakeyaml is used on a custom JRE (#7598)
Fixes #7580
2023-01-19 10:30:18 -08:00
Mateusz Rzeszutek b2f42ec3fa
Encode version in spring instrumentations' package names (#7608)
Part of #932

I wanted to get this done before starting the spring boot starter v3
work.
2023-01-19 10:03:17 +00:00
Mateusz Rzeszutek d89932098a
Disable YodaCondition check and revert some of the changes (#7596)
Let's keep close to the SDK repo config. 

I reverted some of the changes, only left those that I think make sense
anyway (e.g. comparing enums with `==`)
2023-01-17 19:44:15 -08:00
Mateusz Rzeszutek 743df7b3da
Convert Spring Webflux client tests to Java; add library instrumentat… (#7566)
…ion tests
2023-01-17 11:53:24 +01:00