Sets the attributes in the given OpenTelemetry context.
If OI tracer is used in spans created during this active context, the attributes will be added to the span as an attribute.
Parameters
context: Context
The context to set the attributes on.
attributes: Attributes
The attributes to set on the context.
Returns Context
The context
Example
context.with( setAttributes(context.active(), { custom:"value", test:"attribute" }), () => { // Spans created here will have custom attributes } );
Sets the attributes in the given OpenTelemetry context. If OI tracer is used in spans created during this active context, the attributes will be added to the span as an attribute.