GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add possibility to control MDC values for adding to log message · Issue #6320 · googleapis/google-cloud-java

Add possibility to control MDC values for adding to log message #6320

New issue
Copy link
New issue
Copy link
Closed
#6430
Closed
Add possibility to control MDC values for adding to log message#6320
#6430
Copy link
Assignees
codyoss
Labels
api: loggingIssues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@gendolf3d
gendolf3d
opened on Sep 23, 2019
Issue body actions

The issue:

All values from MDC are written as labels to each log message, even if there is no need in some of them.
Usually MDC is populated by a built-in components (like MDCInsertingServletFilter) with all possible values, but only several of them are used in log message.

google-cloud-java/google-cloud-clients/google-cloud-contrib/google-cloud-logging-logback/src/main/java/com/google/cloud/logging/logback/LoggingAppender.java

    for (Map.Entry<String, String> entry : e.getMDCPropertyMap().entrySet()) {
      if (null != entry.getKey() && null != entry.getValue()) {
        builder.addLabel(entry.getKey(), entry.getValue());
      }
    }

Possible solution:

  1. Add possibility to control which MDC values should be added to log message.
  2. Add Enhancer to add required values of MDC.

Activity

  1. yoshi-automation
    added
    triage meI really want to be triaged.
    on Sep 24, 2019
  2. chingor13
    added
    api: loggingIssues related to the Cloud Logging API.
    on Sep 25, 2019
  3. yoshi-automation
    added
    🚨 criticalP0 critical issue. Requires immediate fix
    on Sep 28, 2019
  4. chingor13
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Oct 2, 2019
  5. chingor13
    assigned
    codyoss
    on Oct 2, 2019
  6. yoshi-automation
    removed
    triage meI really want to be triaged.
    🚨 criticalP0 critical issue. Requires immediate fix
    on Oct 2, 2019
  7. codyoss
    added a commit that references this issue on Oct 3, 2019

    fix(logging): add ability to filter MDC labels

    This issue will close once commit 6a391c5 is merged into the 'master' branch.
    6a391c5
  8. codyoss
    added a commit that references this issue on Oct 17, 2019

    fix(logging): add ability to filter MDC labels

    This issue will close once commit 7a817b1 is merged into the 'master' branch.
    7a817b1
  9. gendolf3d commented on Nov 14, 2019

    @gendolf3d
    gendolf3d
    on Nov 14, 2019
    Author
    More actions

    Hello! As I can see the issue gets stucked for a month, may I help somehow?

  10. codyoss
    closed this as completedin #6430on Nov 14, 2019
  11. codyoss
    added a commit that references this issue on Nov 14, 2019

    fix(logging): add ability to filter MDC labels (#6430)

    This issue will close once commit 6c40d9b is merged into the 'main' branch.
    6c40d9b
  12. codyoss commented on Nov 14, 2019

    @codyoss
    codyoss
    on Nov 14, 2019
    Member
    More actions

    @gendolf3d You helped by reminding me to bump this, thank you. I will be cherry-picking the code over to https://github.com/googleapis/java-logging

  13. gendolf3d commented on Jan 9, 2020

    @gendolf3d
    gendolf3d
    on Jan 9, 2020
    Author
    More actions

    @codyoss Hello! I'm just curious when it's being planned to merge fix to goolgeapis/java-logging project?
    Thank you in advance!

  14. codyoss commented on Jan 9, 2020

    @codyoss
    codyoss
    on Jan 9, 2020
    Member
    More actions

    I will try to get it done today, thanks.

  15. codyoss commented on Jan 9, 2020

    @codyoss
    codyoss
    on Jan 9, 2020
    Member
    More actions

    This commit does actually already exist. It is just in a different repo: googleapis/java-logging-logback@46c421c

  16. chingor13
    added a commit that references this issue on Jan 6, 2026

    fix(logging): add ability to filter MDC labels (#6430)

    This issue will close once commit 46c421c is merged into the 'main' branch.
    46c421c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @codyoss
    codyoss

Labels

api: loggingIssues related to the Cloud Logging API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.