Skip to content

Initial trace id using a bit of a hack.#1682

Open
MikeNeilson wants to merge 6 commits intodevelopfrom
feature/1666-trace-id
Open

Initial trace id using a bit of a hack.#1682
MikeNeilson wants to merge 6 commits intodevelopfrom
feature/1666-trace-id

Conversation

@MikeNeilson
Copy link
Copy Markdown
Contributor

@MikeNeilson MikeNeilson commented Apr 8, 2026

NOTE: goal is to get this working with just the ScopeLoggingContext, however, a bit more research is required.

The combination of slf4j and logback, while not required, does simplify the create of structured logs. As well as having the same log output as OpenDCS uses in cloud environment which will simplify log searches (we aren't learning two formats.)

There is a gRPC context mechanism provided by flogger but I'm still reading up. I think I'm likely to create a custom ContextDataProvider (what Flogger needs implemented) to handle mapping to the SLF4j MDC. so still using that system, just cleaner.

Additionally, since we know we have async things, we'll need to sort out how the nested contexts work on a thread pool to make sure the Trace ID passing along correctly.

For those that do not like the log formatting, one can always setup your local environment to use something you find more friendly (and it probably wouldn't hurt to just duplicate the new cda.log to a non-structured format). We can probably also find a tool that renders those JSON entries and makes searching easier.

@MikeNeilson MikeNeilson force-pushed the feature/1666-trace-id branch from 558997c to a953cac Compare April 13, 2026 16:37
@MikeNeilson MikeNeilson marked this pull request as ready for review April 13, 2026 16:53
@MikeNeilson
Copy link
Copy Markdown
Contributor Author

NOTE: I'm not hard set on the whole logback thing, it was a rather obnoxious pain to get working; However, I believe there is going to be custom work no matter what as most items that use JUL don't really provide much support for things like the MappedDiagnosticContext concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant