Commit Graph

111 Commits

Author SHA1 Message Date
Evgeniy Zuikin 2ee4ee116d
Remove mdc attributes prefix (#9536)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2024-01-05 18:41:53 +00: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 4a8c4eca04
Reformat logback appender readme (#10122) 2024-01-01 17:37:27 -08:00
Lauri Tulmin 2eb5974ecd
Add builder for logback LoggingEventMapper (#10000) 2023-12-05 08:29:47 -08:00
Mateusz Rzeszutek 65ee9510f5
Rename the `instrumentation-api-semconv` module into `instrumentation-api-incubator` (#9985) 2023-12-04 08:28:10 +01:00
Jean Bisutti c5cb94893b
Ability to instrument logs before OTel injection into OTel appenders (#9798)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-11-17 10:03:17 -08:00
Lauri Tulmin 5ab3fdd112
Capture logback logger context properties (#9553) 2023-11-16 16:38:10 +02:00
cleverchuk 81f8bf6231
Add `service.name` to MDC (#9647)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-11-13 09:37:19 -08:00
Lauri Tulmin c49f21d483
Replace interface with abstract method (#9817) 2023-11-07 07:56:18 -08:00
Jean Bisutti a17238454d
Add volatile to the Logback OpenTelemetry appender (#9748) 2023-10-23 14:38:58 -07:00
Lauri Tulmin 795c053dc6
Fix spec links (#9603) 2023-10-04 17:54:35 +03:00
Edward Samson 647f1fba04
Fix logback-appender-1.0 dependency example (#9586) 2023-10-02 09:49:58 -07:00
Jay DeLuca 4deb652934
Convert logback-mdc-1.0 tests from groovy to java (#9490) 2023-09-19 13:18:46 +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
Mateusz Rzeszutek 6dd89308d4
Fix logback appender package name (#9080) 2023-07-31 17:52:42 +00:00
Steven Swartz 65d4c4bf4c
Document configuration options for logback appender library (#9078) 2023-07-31 10:50:08 +02:00
Jean Bisutti 4730c6540e
Fix GraalVM native tests (#9068) 2023-07-28 09:35:36 +02:00
Trask Stalnaker 2bdddafdc4
Apply Prettier to markdown files (#8968) 2023-07-19 12:22:35 -07:00
lu-xiaoshuang a410cdeb39
support for adding baggage to log4j 2 ContextData (#8810) 2023-07-04 10:19:20 +02:00
jack-berg d20da99e94
Log4j and Logback appenders opt-in to using GlobalOpenTelemetry (#8791) 2023-06-29 19:45:04 +00:00
Stephen Cprek a60a324189
Add easier discoverability and clarity to the MDC appender docs (#8638)
Co-authored-by: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com>
2023-06-27 12:14:04 +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
Lauri Tulmin e64f9dc824
Use @SuppressWarnings(deprecation) instead of @Deprecated (#8645) 2023-06-05 09:34:53 +02:00
Lauri Tulmin d7d629617a
Fix using logback mdc instrumentation along with SocketAppender (#8498) 2023-05-16 12:03:37 +02:00
OpenTelemetry Bot 2b7b27b990
Update the OpenTelemetry SDK version to 1.26.0 (#8427)
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2023-05-06 22:55:01 +00:00
Lauri Tulmin 2280b3fd80
Correct logback mdc appender class name (#8335) 2023-04-21 15:04:06 +02:00
Lauri Tulmin 1393604118
Add option to capture logback key value pairs (#8074)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/8059
2023-04-03 11:30:04 -07:00
Jean Bisutti c5ef8ffd60
Add GraalVM native tests (#8163)
This PR allows:
* Executing the OTel Logback appender tests as GraalVM native
executables
* Executing the native tests once a day on Github

---------

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2023-03-30 14:10:48 -07:00
Lauri Tulmin eac75a1d0b
Prefix baggage key not value when adding it to logback mdc (#8066) 2023-03-22 13:14:10 +01:00
Lauri Tulmin 0ef4c0beb9
Don't wrap exceptions from logback appender (#8040) 2023-03-13 17:23:48 +01:00
adamleantech 96fd1d7522
Add Baggage to logback MDC controlled by flag (#7892)
The intention here is to allow users of the java agent to set a VM flag
in order to be able to add values in the current Baggage context to MDC
for logback. It seemed unwise to turn this on by default - if the
application is configured to print all MDC contents (as it often the
case with JSON output) then baggage would be logged out by default which
may either bloat the logs or result in sensitive data being exposed
unitentionally.

Addresses #1391 and #6708

Note that this is my first contribution to this repo, I've done my best
to follow the existing approaches to things like testing but would
appreciate any feedback.

---------

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2023-03-09 08:03:56 -08:00
Jean Bisutti ff73e9577c
Make the OpenTelemetry Logback appender work with GraalVM native images (#7989)
I have tried the [OpenTelemetry Logback
appender](https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/logback/logback-appender-1.0/library)
with GraalVM native images. The GraalVM configurations of this PR are
required to make it work.

It's my first GraalVM-related PR in this repo. In future works, adding
automatic tests with GraalVM on some [programmatic instrumentation
libraries](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#libraries--frameworks)
may be interesting.
2023-03-08 07:58:37 -08:00
Lauri Tulmin 36af04266a
Fix AbstractMethodError in logback instrumentation (#7967)
Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7949
Replace wrapper class with JDK proxy to ensure that all methods are
implemented and delegated to the underlying event.
2023-03-03 08:32:50 -08:00
Trask Stalnaker a26b5f6639
Support slf4j to log4j2 (#7656) 2023-02-07 14:38:04 -08:00
Trask Stalnaker 7091719e96
Rename logback mdc library package name (#7752) 2023-02-07 07:04:35 -08:00
Trask Stalnaker dab33810bb
Convert logging instrumentation tests to Java (#7631)
currently based on #7632
2023-01-24 15:18:39 -08:00
Trask Stalnaker adbd9664f4
Fix some instrumentation scope names (#7632) 2023-01-23 19:46:06 -08:00
Trask Stalnaker 2f76931e2f
Add logback configuration doc (#7392)
See #7389

Co-authored-by: Fabrizio Ferri-Benedetti <fferribenedetti@splunk.com>
2022-12-12 13:55:23 -08:00
Aaron Ai 2d7395c44b
Introduce markdown lint check (#7175)
Fixes #7129
2022-11-16 20:48:42 -08: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
jack-berg aeac361816
Upgrade to otel java 1.19.0 (#6757)
Working PR to capture all the changes required to update to otel java
1.19.0. The new log API force allows
`:instrumentation-appender-api-internal` and
`:instrumentation-appender-sdk-internal`, but necessitates a decent
amount of refactoring as a result.

The PR points at the `1.19.0-SNAPSHOT`, which I'll update upon
publication.

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
2022-10-12 09:19:37 -07:00
Jean Bisutti c42eac95fd
Add marker attribute for Logback (#6652) 2022-09-22 09:54:55 -07:00
Trask Stalnaker ec3ba77101
Convert logback test to Java (#6613) 2022-09-14 10:58:59 -07:00
Jean Bisutti f135169f1d
Add code attributes for Logback (#6591)
* Add code attributes for Logback

* Rename property

* Add a note about performance

* Add null check on file name

* Add check on line number

* Fix test following new behavior

* spotless

* Update instrumentation/logback/logback-appender-1.0/library/src/main/java/io/opentelemetry/instrumentation/logback/appender/v1_0/internal/LoggingEventMapper.java

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

* Fix test

* Adapt test for Java 18

* codenarc

* Test fix

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
2022-09-13 09:25:52 -07:00
Trask Stalnaker eb43ea9a1e
Update logback test dependencies (#6554) 2022-09-07 08:17:34 +02:00
Mateusz Rzeszutek 0d6f0b15d0
Update dependencies (#6499)
* Update dependencies

* Strictly pin slf4j and logback versions

* logback 1.3

* Only use slf4j 2.0.0 internally in the javaagent

* Pre-initialize slf4j provider

* Bump jackson version

* licenses
2022-09-06 13:04:30 -07:00
Trask Stalnaker faa99b2eeb
Update SDK to 1.17.0 (#6467)
* Update SDK to 1.17.0

* Fix

* Update licenses

* Spotless

* license
2022-08-12 17:10:46 -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
Mateusz Rzeszutek 257009f944
InstrumentationConfig part 5: library logging appenders (#6321)
* InstrumentationConfig part 5: library logging appenders

* Logback

* remove log4j hackery

* fix tests

* Remove unused

Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
2022-07-18 14:28:26 -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