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.

Allow mapping custom field values via custom annotations

See original GitHub issue

What would you like to be added: I’d like to add the ability to map custom annotations to custom field names, allowing you to set custom fields using custom annotations values.

An example values file for logging might look like this:

customMetadataAnnotations:
  - name: "application"
    annotation: "splunk.com/application-field"

And then, by specifying an annotation splunk.com/application-field on a pod or namespace would map the given value to a custom field application in Splunk for log events originating from that pod or namespace.

Why is this needed: It’s currently not possible to easily customize custom fields with values that may vary from pod to pod, it’s only possible to specify static values. I have tried specifying a static value that included ${record.dig(...)} type expressions, but, because in the config map, the value is wrapped in "", it’s error-prone and doesn’t quite behave as expected.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

0reactions
github-actions[bot]commented, Dec 4, 2021

This issue was closed because it has been inactive for 14 days since being marked as stale.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating a Custom Annotation in Java - Baeldung
When creating custom annotations with methods, we should be aware that these methods must have no parameters, and cannot throw an exception.
Read more >
java - Access value from a custom annotation on a field
1 Answer 1 ... If you want to get the value of your custom annotation ("Cancel Button") at runtime, reflection is the way...
Read more >
Creating Annotations in Java - DZone
This takes the repetitive logic of the serialization process (mapping field names to fields values) and places it into a single serializer class ......
Read more >
Injecting Lineage Data as a Custom Annotation into a SAP ...
Hi. I am wanting to inject a specific custom annotation into the metadata returned to my SAPUI5 client(s). I am happy with the...
Read more >
Custom annotations in Java | softwarecave
Another important difference is the ability to specify a default value for the annotation element. If the element has a default value, it...
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