You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Which problem is this PR solving?
- closes#969
- close a buncha dependabots
## Short description of the changes
- update all deps in java services
- update java year to use vanilla otel, specifically the java agent
- update java year to use log4j logs
- update `docker-compose.java.yml` to include `OTEL_LOGS_EXPORTER=otlp`
Some findings:
- Using java agent <2.x, set `OTEL_LOGS_EXPORTER=otlp`
- Using java agent >=2.x, exporter is enabled by default
- For more fine-tuning, use `log4j2.xml` or in this specific service
that uses Springboot, use `log4j2-spring.xml`. Some instructions are
[here](https://docs.spring.io/spring-boot/docs/1.2.x-SNAPSHOT/reference/html/howto-logging.html#howto-configure-log4j-for-logging)
and
[here](https://www.baeldung.com/spring-boot-logback-log4j2#log4j2-extensions).
- I tried getting a better JSON-formatted log but it didn't quite look
as I wanted and so I wasn't sure it was worth it to add here (would be
included in above step). I tried both
[JSONLayout](https://logging.apache.org/log4j/2.x/manual/layouts.html#JSONLayout)
(deprecated) and
[JsonTemplateLayout](https://logging.apache.org/log4j/2.x/manual/json-template-layout.html).
- Also for the log itself, the `MapMessage` showed up in Honeycomb as an
empty string `""`, whereas `ObjectMessage` showed `{selected_year=2015}`
which is why I went with it. Maybe that's something to look further
into, as MapMessage seems like it might be a nicer format.
## How to verify this has the expected result
From the root directory run `tilt up java`, or from the java year
service set env vars including `OTEL_LOGS_EXPORTER=otlp` then `./gradlew
build` and `./gradlew bootRun`... and curl the endpoint `curl
localhost:6001/year`.
The log for selected year should show up in Honeycomb on the
`YearService.getYear` span
update java year service to use vanilla otel and add logs
The text was updated successfully, but these errors were encountered: