Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with trace and correlation #1230

Open
vaishnavi-accountbox opened this issue Dec 17, 2023 · 1 comment
Open

Issue with trace and correlation #1230

vaishnavi-accountbox opened this issue Dec 17, 2023 · 1 comment
Assignees
Labels
api: logging Issues related to the googleapis/java-logging-logback API. priority: p3 Desirable enhancement or fix. May not be included in next release.

Comments

@vaishnavi-accountbox
Copy link

Hi,

I am inserting couple of logs with slf4j, with a same trace, But still they are not displaying as different logs, How to fix this ? Here is the image https://snipboard.io/u8mBf5.jpg

Here is my appender

INFO application.log gae_app com.survey.util.LogEnhancer WARN
<root level="info">
    <appender-ref ref="CLOUD" />
</root>

Here is my enhancer

@OverRide
public void enhanceLogEntry(LogEntry.Builder logEntry) {

        logEntry.setTrace("12345678");

        // add additional labels
        logEntry.addLabel("test-label-1", "test-value-1");
        logEntry.addLabel("eb-survey-log", "test-value-1");

  }

Please help

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/java-logging-logback API. label Dec 17, 2023
@cindy-peng
Copy link
Contributor

Hi @vaishnavi-accountbox, I see two log entries in your screenshot. Could you help explain more how did you insert slf4j logs and what's your expected result?

@cindy-peng cindy-peng added the priority: p3 Desirable enhancement or fix. May not be included in next release. label Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging-logback API. priority: p3 Desirable enhancement or fix. May not be included in next release.
Projects
None yet
Development

No branches or pull requests

2 participants