Conversation
Codecov Report
@@ Coverage Diff @@
## 6.x.x #1954 +/- ##
========================================
Coverage ? 80.61%
Complexity ? 2946
========================================
Files ? 214
Lines ? 10928
Branches ? 1451
========================================
Hits ? 8810
Misses ? 1592
Partials ? 526 Continue to review full report at Codecov.
|
| if (mdcProperties.containsKey(mdcTag)) { | ||
| event.setTag(mdcTag, mdcProperties.get(mdcTag)); | ||
| // remove from all tags applied to logging event | ||
| mdcProperties.remove(mdcTag); |
There was a problem hiding this comment.
@bruno-garcia do we want to add entries only to either tags or context not both?
There was a problem hiding this comment.
just in tags is fine, no need to dupe 👍
| minimumBreadcrumbLevel="DEBUG" | ||
| minimumEventLevel="WARN" | ||
| debug="true" | ||
| mdcTags="userId" |
There was a problem hiding this comment.
should this sample also show how to set multiple?
There was a problem hiding this comment.
Sample updated.
| <debug>true</debug> | ||
| <!-- NOTE: Replace the test DSN below with YOUR OWN DSN to see the events from this app in your Sentry project/dashboard --> | ||
| <dsn>https://502f25099c204a2fbf4cb16edc5975d1@o447951.ingest.sentry.io/5428563</dsn> | ||
| <mdcTag>userId</mdcTag> |
There was a problem hiding this comment.
should this sample also show how to set multiple?
There was a problem hiding this comment.
is <mdcTag> correct here? or should it be <mdcTags>?
There was a problem hiding this comment.
It is correct. under the hood it calls addMdcTag
There was a problem hiding this comment.
Sample updated.
| private final @NotNull List<String> inAppExcludes = new CopyOnWriteArrayList<>(); | ||
| private final @NotNull List<String> inAppIncludes = new CopyOnWriteArrayList<>(); | ||
| private final @NotNull List<String> tracingOrigins = new CopyOnWriteArrayList<>(); | ||
| private final @NotNull List<String> mdcTags = new CopyOnWriteArrayList<>(); |
There was a problem hiding this comment.
Can anyone think of a name that's a bit more generic than MDC Tags?
In case any other SDK wants to add support for a similar feature it might be nice if they can use the same name.
Something like logContextTags or promoteLogContextEntriesToTags?
We should then probably mention somewhere that this takes MDC entries and puts them into sentry tags so people can actually find this feature when searching for MDC.
There was a problem hiding this comment.
Perhaps contextTags? I am open to change it to anything more suitable.
There was a problem hiding this comment.
contextTags sounds good to me. Can you please rename it? Sorry for the inconvenience but I'd rather change it now than deprecate and rename later as we've already been asked to pick a name that can be used for more than just the Java SDK.
|
Hi @adinauer, has this PR been actually released ? It's missing in CHANGELOG.md and documentation. |
|
Hello @verglor, yes it has been released with version |
📜 Description
Add option to specify MDC tag names that are mean to be applied as Sentry tags to Sentry events instead of putting into event contexts as we used to do.
💡 Motivation and Context
Fixes #1148
💚 How did you test it?
Unit & Integration tests.
📝 Checklist