Adds support for collecting log attributes. This includes support for collecting complex objects like structs, slices, arrays, and maps. Passing a complex object will result in it getting marshaled into a JSON string using the standard library json.Marshal() function. This may increase the runtime complexity and allocation cost during harvest periods. If the object is marshaled into a string that exceeds 256 bytes, we will truncate it in the agent. This will result in an invalid JSON string getting sent to the collector, and it will not be parsed. We deemed collecting sub-optimal data to be better than dropping it in this case.
Verification Steps:
[x] Additional Test Coverage for new JSON including attributes added
[x] Manually Tested and Verified by sending logs with attributes attached to NR collector
[ ] Verify we can consolidate JSON generation with other attribute types with the collector team (the agent guards against adding user attributes that are of an illegal type, so this is not a blocker)
Adds support for collecting log attributes. This includes support for collecting complex objects like structs, slices, arrays, and maps. Passing a complex object will result in it getting marshaled into a JSON string using the standard library json.Marshal() function. This may increase the runtime complexity and allocation cost during harvest periods. If the object is marshaled into a string that exceeds 256 bytes, we will truncate it in the agent. This will result in an invalid JSON string getting sent to the collector, and it will not be parsed. We deemed collecting sub-optimal data to be better than dropping it in this case.
Verification Steps: