As a user, I'd love a log/tracing-style mechanism where I can opt into initializing and registering a global client, and then using macros to simulate variadic calls that let me insert custom tags and properties.
In practice, this could look like:
appinsights::track_event!("my custom event"; k1 = "v1", k2 = ?v2, k3 = %v3);
In this example, the event name would be custom event, k1 would map to the string v1, k2 would map to the Debug impl for the value of v2, and k3 would map to the Display impl for the value of v3. This could (ideally) be supported in all event types.
As a user, I'd love a
log/tracing-style mechanism where I can opt into initializing and registering a global client, and then using macros to simulate variadic calls that let me insert custom tags and properties.In practice, this could look like:
In this example, the event name would be
custom event,k1would map to the stringv1,k2would map to theDebugimpl for the value ofv2, andk3would map to theDisplayimpl for the value ofv3. This could (ideally) be supported in all event types.