question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

replacing a custom label leads to no more log entries

See original GitHub issue

When we add a second custom label, the logs stop working.

    log.Infof "set the batch label"
    log.AddLabel "batch" (sprintf "%d" batchId)
    log.Infof "batch label was set for the first time"
    let batchId = batchId + 1
    log.Infof "set the batch label a second time"
    log.AddLabel "batch" (sprintf "%d" batchId)
    log.Infof "batch label was set a second time"

Results in this where the last entry is missing. image

let appender = new Google.Cloud.Logging.Log4Net.GoogleStackdriverAppender()
...

        member x.AddLabel key value =
            appender.AddCustomLabel(Google.Cloud.Logging.Log4Net.GoogleStackdriverAppender.Label(Key=key, Value=value))

I was expecting AddLabel to act like a Dictionary and replace the previous label with the same key.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ctaggartcommented, May 10, 2017

Any chance you could provide a complete example in C# that would let us reproduce this easily?

@jskeet, I thought I saw on twitter that you were going to work on your F# skills!? 👽

Yes, will do.

0reactions
chrisdunelmcommented, Jun 6, 2017

Fixed by #1093

Read more comments on GitHub >

github_iconTop Results From Across the Web

Salesforce lightning custom label not getting updated even ...
I have an issue with Custom label behavior. I have created Custom Label to Show/Hide Custom Related list. This custom label is set...
Read more >
How to Add Custom Label or Key to Records in Fluentd
In this blog post, I will walk you through the process of adding custom label and key to the log records, so that...
Read more >
Troubleshoot log-based metrics
New log entries might not match your metric's filter. A log-based metric gets data from matching log entries that are received after the...
Read more >
Custom configurations - Azure Information Protection ...
Apply a custom property when a label is applied - Change the local logging level - Change which file types to protect
Read more >
Stackdriver execution_id and custom labels - logging
I'm using Google Cloud Functions and the module @google-cloud/logging-winston. My first issue is when using this module the property labels: { ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found