camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.08k stars 1.54k forks source link

Documentation for Logging context parameter loggingContextBusinessKey is unclear. #2483

Open ThorbenLindhauer opened 3 years ago

ThorbenLindhauer commented 3 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-13204
Reporter @rtkohl
Has restricted visibility comments false

When trying to setup the logback.xml and get the process data context from MDC it was unclear what exactly has to be done for "LoggingContextBusinessKey".

The following questions arose from our consultants:

When trying to embed the business key into the MDC which is set per default to null as shown here: https://docs.camunda.org/manual/latest/reference/deployment-descriptors/tags/process-engine/#logging-context-parameters 

To which value and where do I need to set the parameter "loggingContextBusinessKey" in order to make it available within the log output? 

Once that's clarified, I'd vote for making this sentence in the docs more understandable:

"The specified data will only be put into the MDC if a key is defined." maybe something like this"The specified data will only be put into the MDC if a key is defined in the application.yaml  or the bpm-platform.xml file." and then provide some examples (application.yaml, Processes.xml, BPM-Platform.xml). like this one

application.yaml file I needed to add this:

camunda:
  bpm:
    generic-properties:
      properties:
        loggingContextBusinessKey: businessKey #This is key name that will show up in the log file.

 

So would someone be able to change the wording and add some examples to make this clearer? If two of our own consultants are having an issue then it's probably not clear for a customer either.

 

 

Acceptance Criteria (Required on creation):

Hints (Optional):

Links:

ThorbenLindhauer commented 3 years ago

This comment was imported from JIRA and written by user @rtkohl


7d1mLxj, @benhoffmann,

I created this CAM ticket for the documentation issue.

If you have anything to add please do.

Thanks,

Rich