The really tricky things are on the integration sie with Docker/Kubernetes sidecars etc. but that does Not look like anything to specify in Java or MP either.
Just to inject a logger with CDI, sorry nur what Kind of spec should that be. Abstraction layers like SLF4J exist and are widely established so what would be left that justifies another spec?
Werner
--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/ef900c9e-8071-444f-9bda-d29b0a53eb4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to microp...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/e4387206-f707-46f8-90b5-7b9a223864c6%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CAKeeVe6s5VWAfzFDfsH0g0xMqxLrn_vUKWJ-Y%3D6TnxxMHkiYVQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CAKmOgMEVuoVMhpVRCsn3meoLM-QuvsoscKrgX73HRmJCZ9Kwgg%40mail.gmail.com.
Eclipse MicroProfile is a collection of community-driven open source specifications that define an enterprise Java microservices platform.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CALbocO%3DqNRbq2B1_UVWtBENf7LvPKGs-S0egFwZUHFMSALkz4Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/e4387206-f707-46f8-90b5-7b9a223864c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/88a955ba-123b-4ad1-a6fb-86ef333a3e4e%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/79516943-3f35-4a52-8050-2d5aa58eff9e%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/f67771c4-76df-47f2-8633-b8ee7e85abab%40googlegroups.com.
I think we're in the position of deciding the items I note below, how do go about formalising those decisions?
- Should Microprofile have an opinion on Logging?
- I get the feeling there is a general leaning towards the answer being yes.
- How do we draw out a final/conclusive decision?
- If yes, does it stop at being guidance to use SLF4j+JDK14 so an app has the best chance of an integrated experience?
- Before a spec exists, it would at least help.
- Personally, I don't think this would be sufficient as that guidance may become less relevant over time depending on how app servers change in new versions.
- If we agree on needing a spec, does it select an existing API or is a new one created?
- I'd advocate for selecting an existing one such as Log4j2 or SLF4J.
- Are there other APIs that should be considered?
- If it's a problem politically to select an existing API or because it would significantly hinder spec adoption due to the complications for App Servers, then a new one is required.
- Would it be worth considering reaching out to the communities for the various Logging frameworks to see if any would be willing to donate their API such that it came under the Microprofile namespace and remained implementation agnostic? Something the implementations could rally around. Just a thought...
- If a new API is required, how does that happen?
- Anything new should likely take a very strong guidance from existing APIs.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/f8818b0e-b9db-474d-a541-a777742454c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/f8818b0e-b9db-474d-a541-a777742454c2%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CANghgrSPk1cKem9X2aLBrqfA4binMzuqSx3dxAEhTAb3yimQ-Q%40mail.gmail.com.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/abc607b8-dccc-40d8-8249-84ba64c06ae9%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CANghgrRBRR%3DS6ww_aApixZDwRHvMD2BsMbMtMcEe36rMad5wMA%40mail.gmail.com.
I think using the Java system logger as a specified API would be a bad
idea; the API is pretty limited and I don't think anyone would choose
it given any other option. I don't think there is really any rational
approach other than either specifying an existing API facade (which is
to say, exactly SLF4J) or simply dropping the issue and letting users
do what they want (i.e. deliberately leave it unspecified). Though I
suppose there's a middle ground where it could be specified like this:
"The MicroProfile environment shall provide a logging infrastructure
such that common category-and-level-oriented logging APIs will behave
as expected". But it doesn't seem useful to bother doing any of these
things; what problem are we trying to solve anyway?
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CANghgrRScAXaQkAGyrhF5ATZb%2BTx37zD%3Dn3SkjS2VJbFKwkjYA%40mail.gmail.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to microp...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/26d36e71-e231-4343-ad78-5f0101fa61e4%40googlegroups.com.
The point about standardising on JUL was that although JUL is in every JVM, it does not mean that the appserver/runtime is actually using it or supports hosted apps using it (for an integrated experience). This also applies to the management of logging levels, modules/packages, etc. that each runtime exposes a mechanism for. AFAIK, runtimes such as OL, Wildfly, etc. have made a specific choice to support app logging one way or another via JUL. Maybe I'm wrong about though?
Although selecting an existing API would be more ideal in avoiding "yet another Logging API" (as pointed out by responses quoting XKCD 927) the question is whether those existing APIs are right for an MP environment. There is a risk that any existing API is actually more than would be necessary for an mp-logging API and parts of those APIs would either go unimplemented or, implemented for no good reason apart from providing a complete implementation. Alternatively, this is where using Log4j, SLF4J or any other that can use JUL as a backend, which is in turn supported by the runtime, began to be attractive.
+1 on your final point. I suggested something along the same lines in my initial post and a follow up where I expanded a little. I like the additional point about being able to inject the platform specific chosen logger and choose to forfeit portability or use the mp-logging API and retain portability.I think I have to bite the bullet and start the doc in the sandbox as Emily requested and let that take its course.
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To post to this group, send email to microp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CANghgrQqpX3G7Ly_qocxRE5MJ0opwHtzYPKnwWhygvPNbS539Q%40mail.gmail.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to microp...@googlegroups.com.
> To post to this group, send email to microp...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/ef42bcd4-65cd-44f1-8d63-e2e628ab3b2e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
- DML
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CANghgrSoozrS-snRRyie3fYLSTHgRhP4n2Ue%3Db%3DWdquGL4H9kQ%40mail.gmail.com.
> To unsubscribe from this group and stop receiving emails from it, send an email to microp...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/e091f62a-b842-46b8-b673-7288d501509c%40googlegroups.com.
--
- DML
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
--You received this message because you are subscribed to the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this group and stop receiving emails from it, send an email to microprofile...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/e091f62a-b842-46b8-b673-7288d501509c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to microp...@googlegroups.com.
Thank you! I will move the doc as you suggest. Do I continue to open PRs from my sandbox clone, à la the GitHub way or, do I work on branches directly on the sandbox? As I was working on the tracing support I had come across the news of the merger between OpenTracing and OpenCensus into OpenTelemetry. I stuck with OpenTracing for now as it appears there is no logging support in OpenTelemetry and it's a TBD item right now with no firm dates, at least ones that I could find. Also, the runtimes have OpenTracing support at the moment so, I was more readily able to experiment. I will certainly keep an eye on the progress of OpenTelemetry and possibly get involved over there too.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/CANghgrSK9YfNfUqpnsv_ppA1GarHKpRAAnQ%2Bku%3DHSUxzKHYj7A%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/5273cf69-09c6-4b28-a581-deac3a660399%40www.fastmail.com.
In short, I agree with most of what you've said. I agree that picking a pre-existing API would be the ideal. I think most in this thread would also agree with that. The only place I'd waiver is around the MDC. Although I agree it's important and useful, I think it has a better place under Observability as a whole rather than specific to Logging.
Although I agree with picking an existing API I have obviously done the exact opposite and proposed a new one more recently. My reasons for doing so were:
- An API that more readily supported Structured Logging but was not a huge departure from popular APIs (I.e. SLF4J).
- Easy to adopt from an IP point-of-view.
- Simplify the act of logging to OpenTracing. This was an attempt at the MP tenets of lowering the barrier of entry and make OpenTracing Logging easier with less boilerplate.
- The suggestion of adopting an existing API garnered either ambivalence or negativity, but there again so did suggesting a new API.
Having said that, these are just my efforts to see what resonates with the community and what doesn't; to generate discussion with the hope that something emerges.
Speaking more generally, IMHO the lack of a single logging API is a problem systemic to Java. Even if MP were to select an API as standard, that does not account for the transitive dependencies on other logging APIs brought in by external libs.I personally believe the ideal solution would be for the vendors of the major Logging Frameworks to join a single (working) group/process (Eclipse, Apache, Google, CNCF, JCP, OpenTelemetry, etc.) with the intent to deprecate their own APIs and create a single replacement API.Rather than repeat XKCD 927, each of those vendors would necessarily have to make it clear that they have chosen this new API over continuing with their own, they could of course continue to each provide their own separate implementations. This wouldn't solve the problem over night but I'd hope for adoption as the direction would be clear. Hopefully, the opensource world would rally behind it. Without the vendors agreement to deprecate their own existing APIs and be part of the messaging/awareness it would very quickly become exactly what XKCD 927 lampoons.The alternative is that MicroProfile attempts to use its popularity and visibility in order to nudge the industry towards a single API.
Although I think SLF4J would be a good choice, is Ceki Gülcü the only maintainer? If so, it's likely he would need to agree to open up SLF4J to other maintainers to ensure that it is not reliant on one person. Otherwise, it would pose a risk for MicroProfile and the compliant runtimes. There would be no point selecting SLF4J to only find out that there is no chance of the community being able to propose new functionality.
What is the negative impact of MicroProfile adopting a standard Logging API? MP's inertia and popularity does not move the needle on third party libraries so, the portability issue is not solved. Having said that, the code most important to the application developer (their own) would have portability guarantees and it's the logging they're most interested in. The optimist in me would like to think that there would be some positive impact eventually regardless. Are there any other negative impacts I'm not considering?
As an aside, could MicroProfile adopt SLF4J without it being under Jakarta or Eclipse?
Finally, I'm going to make a final plea to the MP community to respond/vote, whether it's a yes or a no, as to whether logging is sufficient a problem and one for MicroProfile to attempt solve. I think we need a clear indication as to whether this warrants continued effort. Any suggestions on how best to capture a vote?If the vote does indicate it is something worth pursuing, maybe we can put something more formal around pushing this forward? How best to select a direction and how to bring those wanting to be involved more closely together?I'd also like to thank everyone for their continued efforts in this thread, I realise it's going on for the long haul.
--
You received this message because you are subscribed to a topic in the Google Groups "Eclipse MicroProfile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/microprofile/LuIKg-M9KJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to microprofile...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/microprofile/24943d5f-515b-4bdb-b1c9-2c9d2b307bc7%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to microp...@googlegroups.com.
Rüdiger, Thank you for reaching out to Ceki, I'd be interested to hear what he says. I'll respond to your points below but I think Emily's point is a good one.
I'm resigning myself to this being a problem that MP cannot solve by simply defining/selecting an API. I think there needs to be a joint effort between the logging vendors if, and only if, there could be an agreement from them to deprecate their own APIs in favour of the jointly created API. I will try to reach out to each of them to see if I get any response.
I will certainly take a look at your logging-interceptor. I have taken a look in the past but I want to make sure I understand it fully.
There is some implementation in my proposal but it's only for the integration with OpenTracing. MP OpenTracing already depends on OpenTracing although OpenTelemetry will change that. Other than that, the implementation is intended to provide sufficient framework for a logging implementation to be "injected". That could be a bridge to SLF4J or it could be a container supplied direct implementation to a runtime specific logging framework.As far as I know, the dependency on CDI is fine as MicroProfile has global dependency on CDI, JAXRS, JSON-P and Annotation so, the outlier in my proposal is JSON-B. Having said that, as JSON-B is a JEE 8 specification I'd like to think it wouldn't be a deal breaker. As MP Config is also an API, the Logging proposal depends on the API not a specific implementation and cross-spec dependencies are ok, I think. The dependency on MP Config could be dropped in favour of an explicit API, allowing an application to use MP Config or something else.
The reason for the typed LogEvent was to enable an application to populate whatever data it sees fit but in a structured form that translates nicely into JSON. Once the LogEvent is converted into JSON, it can make filtering/searching easier in Log Aggregation tools such as ELK and Loki. I did consider adding a Map to the base LogEvent to act as a general purpose storage of values but I left it to out to see whether anyone asked for it.The LogEvent wasn't intended to be populated by the container, it's purely an Application scoped object. The only automatically populated value was the spanId, based on the integration with OpenTracing. The LogEventSupplier mechanism is a place for the Application to hook up the pre-population of (possibly application specific) LogEvents. An example of sorts is provided in the test code of the proposal. The theory would be the Application can look up the values it wants to log and add them to the log events it creates; the tracking of the desired values would be up to the application. That could be done using an MDC that the Supplier hooks into or by some another mechanism, it's up to the Application to choose.
The integration with OpenTracing does two things. It populates the Span ID in a LogEvent but also enables the application log to OpenTracing; the Logger will automatically detect the active Span and log to it. There's a section in the Spec proposal but the idea is reduce the boilerplate required for Span logging and the duplication of code if you want to log the same messages to the underlying logging framework as well. As such, my proposal provide a means of hiding that boilerplate as well as dealing with logging to both the Span and locally and putting that behind a single Logging API.