Commit Graph

66 Commits

Author SHA1 Message Date
SylvainJuge 955470a63a
Semconv 1.25.0 migration (#10983)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-09 11:25:52 -07:00
xiangtianyu 42ba962aa8
fix: invalid semantic conventions doc url fix (#10954) 2024-04-08 10:49:42 +03:00
Lauri Tulmin d73962834a
Return wrapped connection from Statement.getConnection (#10554) 2024-02-15 07:54:18 -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 7cd705b555
Remove old HTTP semconv code (#9968) 2023-11-29 08:04:31 -08:00
Mateusz Rzeszutek 280c1ea4c1
Enable stable HTTP semconv by default (#9925) 2023-11-28 10:43:51 -08:00
Lauri Tulmin c973b9ebd4
Fix parsing port from mariadb jdbc url (#9863) 2023-11-14 07:17:10 -08: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
Hannah Chan 2a554bd153
Add JdbcTelemetry and JdbcTelemetryBuilder (#9685) 2023-10-17 07:11:44 -07:00
Trask Stalnaker 3b77cc4b2d
Semconv 1.21 (#9408)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-09-13 19:20:23 +00:00
Yuya Ebihara 2fb000496e
Return default DbInfo when connection is null (#9413) 2023-09-08 08:50:58 -07:00
Mateusz Rzeszutek d140cf91f2
Add support for the AWS Secrets Manager JDBC URLs (#9335) 2023-08-29 11:54:22 -07:00
Mateusz Rzeszutek 65451b6529
Deprecate `NetClientAttributesExtractor` (#9165) 2023-08-16 11:21:10 +02:00
Mateusz Rzeszutek 37531a0720
Fill additional db.* attributes on DataSource#getConnection() (#8966) 2023-07-19 16:06:16 -07:00
Jean Bisutti 22bd9f59df
Convert some JDBC tests from Groovy to Java (#8511)
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
2023-06-13 11:53:30 -07:00
Mateusz Rzeszutek cde2e70148
Implement new stable server semantic conventions (#8663) 2023-06-13 11:07:59 +02:00
Jean Bisutti 9c58284923
Update the JDBC driver documentation (#8512) 2023-05-17 10:19:10 -07: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
Mateusz Rzeszutek e3944a53a5
Make net.transport an optional attribute (#8279) 2023-04-20 08:14:03 -07:00
Trask Stalnaker 70cd8464e2
Fix possible NPE (#8199)
this is a follow-up to #7043

I tried to add a test when that PR was opened:

*
d2c6399a6e

but it doesn't really verify anything, since the NPE is throw/caught and
same behavior occurs
2023-04-03 09:24:14 +02:00
Lauri Tulmin 0a311a1c3e
Remove password from db.user parsed from JDBC url (#8106)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8105
2023-03-22 11:56:55 +01:00
Lauri Tulmin c6adaa35de
Cache DbInfo in OpenTelemetryDataSource (#8025)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7984
2023-03-13 13:10:11 +01:00
Fran Pregernik 1d3752f21b
Allow JDBC autoinstrumentation to use a custom OpenTelemetry instance to be more DI (e.g. Spring Boot) friendly (#7697)
Related to issue
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7677
2023-02-08 17:46:13 +01: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
Mateusz Rzeszutek 0223dc3a28
Fix concurrency issue in OpenTelemetryDriver (#7628)
Fixes #7621
2023-01-20 13:28:22 +01:00
Michal Vavřík 6207887479
OpenTelemetryDriver don't require DriverManager for underlying drivers (#7089)
closes: #7028

For reasons explained in the linked issue, it might be handy to register
drivers directly against `OpenTelemetryDriver` rather than against
`DriverManager`. I decided to also go with static registry as drivers
are often instantiated connect pools (like Agroal) and it could be
difficult to use instance varibles. This PR adds additional `Driver`
collection where drivers can be registered. If driver is registered both
with `OpenTelemtryDriver` and `DriverManager`, drivers registered with
`OpenTelemetryDriver` are preferred.
2022-11-28 14:46:22 -08:00
Aaron Ai 2d7395c44b
Introduce markdown lint check (#7175)
Fixes #7129
2022-11-16 20:48:42 -08:00
Trask Stalnaker 5345c87680
End groovy files with newline (#7127) 2022-11-10 12:21:55 +01:00
Trask Stalnaker 71b3e3e027
Library doc cleanup (#6948)
Related to #6947, but just cleans up the library module doc that already
existed (mostly for uniformity). Does not introduce any new doc.
2022-10-24 10:26:21 -07:00
Mateusz Rzeszutek 77035fc88c
Extract `net.peer.{name,port}` on start for CLIENT spans (#6828)
The [HTTP
spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-client)
says these two attributes must be provided at span creation time - I
think it makes sense to extend it over to all `net`-related
instrumentations, cause these are supposed to be the logical peer
name/port, which are supposed to be known before the connection is
started/exchange is made.
2022-10-10 16:00:19 -07:00
Trask Stalnaker f1774cabe2
Update net semantic convention changes (#6268)
* New net conventions: option a

* Feedback + sock.family + sock.peer.name

* peer.service + tests

* server net attributes attempt 1

* server net attributes attempt 2

* Javadoc

* Revisions

* Apply to instrumentations

* Feedback

* One more default method

* Spotless

* Fix javadoc
2022-08-18 09:02:23 -07:00
Trask Stalnaker 68a9f20eb3
Enable PrivateConstructorForUtilityClass errorprone check (#6427)
* PrivateConstructorForUtilityClass

* Advice

* More advice

* More

* More advice

* More

* Spotless

* Fix

* Fix

* Fix

* A better solution

* Revert

* More

* Fix

* Spotless

* Fix
2022-08-10 11:30:22 +03:00
Trask Stalnaker 0804fef429
Support DataDirect and Tibco Jdbc URLs (#6420) 2022-08-08 17:13:27 -07:00
Trask Stalnaker 11a057594e
Fix db.system for SAP Hana and remove unnecessary code (#6401)
* Remove unnecessary code

* Remove unnecessary code

* Fix tests
2022-08-02 11:16:38 -07:00
Mateusz Rzeszutek 82b39b1012
Rename `newInstrumenter()` into `buildInstrumenter()` (#6363)
* Rename newInstrumenter() into buildInstrumenter()

* spotless
2022-07-25 12:02:46 -07:00
Mateusz Rzeszutek 8d1ba17d29
InstrumentationConfig part 4: DB sanitization (#6317)
* InstrumentationConfig part 4: DB sanitization

* fix couchbase unit tests

* code review comments

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-07-15 21:47:33 -07:00
Trask Stalnaker 8fac01e736
Enable error prone's UnusedVariable check (#6217)
* Enable error prone's UnusedVariable check

* Spotless
2022-06-27 10:55:27 +02:00
Lauri Tulmin b4a1e2e9ee
Fix ClassCastException in JDBC instrumentation (#6088)
* Move DbInfo to boot loader

* add comment

* add test

* spelling
2022-06-16 12:09:24 -07:00
Mateusz Rzeszutek 6a0ca530b7
Instrumentation API changes: VirtualField (#6017)
* Instrumentation API changes: VirtualField

* change class name in string constant
2022-05-12 11:17:24 -07:00
Mateusz Rzeszutek 8e722cc264
Library instrumentation should read its version from a file (#5692)
* Library instrumentation should read its version from a file

* errorprone

* animalsniffer

* code review comments

* add name as task input too

* code review comments
2022-04-04 11:52:23 -07:00
Mateusz Rzeszutek 56f65e4fab
Convert all logging statements from slf4j to jul - part 1 (#5628)
* Convert all logging statements from slf4j to jul - part 1

* fix tests

* use placeholders

* fixed all comments, added static imports for Level
2022-03-22 10:35:27 -07:00
Mateusz Rzeszutek 47f2732aae
Split out DbClientAttributesGetter and SqlClientAttributesGetter (#5354)
* Split out DbClientAttributesGetter and SqlClientAttributesGetter

* code review comments
2022-03-04 09:58:04 -08:00
Mateusz Rzeszutek 27ed47ccda
Split out CodeAttributesGetter (#5342) 2022-02-17 16:47:18 -08:00
Trask Stalnaker 1077258263
Add InternalJavadoc custom error prone check (#5277)
* Add InternalJavadoc custom error prone check

* Add example usage

* Move to conventions

* Revert "Move to conventions"

This reverts commit d8a8209b59.

* Just get it working

* Clearer error message

* versions

* Apply almost everywhere

* feedback

* Always at the end of javadoc

* Fix test

* Missed (at least) one

* No longer internal

* Fix NPE

* Spotless

* Convert awslambda Java test to JUnit 5 so can reduce visibility

* Reduce visibility

* Rename the check

* More

* Move into errorprone-convention

* Fix UserExcludedClassesConfigurerTest
2022-02-01 17:54:57 -08:00
jason plumb c5c0a2bcdf
NetClientAttributesAdapter - favor composition over inheritance (#5030)
* first pass at separating NetAttributesAdapter interface and make NetClientAttributesExtractor concrete

* rename the implementations extractor -> adapter

* hide constructor and make factory method

* rename to client and add javadoc

* spotless

* finish javadoc thought

* rebase

* renamed NetClientAttributesAdapter to NetClientAttributesGetter

* fix lettuce

* code review comments

* code review comments -- renaming for consistency

* adapter -> getter

* fix ratpack

* adapter -> getter
2022-01-20 10:51:13 -08:00
Anuraag Agrawal b7a95857c7
Fix some java lint warnings (#5120)
* Convert InstrumentationTestRunner from interface to abstract class

* Foo

* Commit

* Revert unintended
2022-01-17 10:26:03 -08:00
Anuraag Agrawal f6bcd76219
Update errorprone (#5016)
* Update errorprone

* gwt

* Remove unnecessary final

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-01-06 14:21:56 -08:00
Trask Stalnaker ce4cef76f9
Clean up groovy assertions (#4805) 2021-12-05 23:23:58 -08:00
Lauri Tulmin c79eed765f
Make JdbcData fields final (#4738) 2021-11-29 13:00:49 -08:00