Table of Contents

Class CarrotActivityFactory

Namespace
CarrotMQ.Core.Telemetry
Assembly
CarrotMQ.Core.dll

Factory for creating Activity for CarrotMQ tracing

public static class CarrotActivityFactory
Inheritance
CarrotActivityFactory
Inherited Members

Fields

CarrotRemoteServiceNameKey

Key for remote service name in the activity tags.

public const string CarrotRemoteServiceNameKey = "carrotmq.remote_service_name"

Field Value

string

CarrotServiceNameKey

Key for service name in the activity tags.

public const string CarrotServiceNameKey = "carrotmq.service_name"

Field Value

string

CarrotVHostNameKey

Key for the VHost in the activity tags

public const string CarrotVHostNameKey = "carrotmq.v_host"

Field Value

string

Methods

CreateConsumerActivity(CarrotHeader, string, string, IOptions<CarrotTracingOptions>)

Creates a new Consumer tracing activity.

public static Activity? CreateConsumerActivity(CarrotHeader header, string serviceName, string vhost, IOptions<CarrotTracingOptions> carrotTracingOptions)

Parameters

header CarrotHeader

The CarrotMQ header containing tracing information.

serviceName string

The name of the service creating the activity.

vhost string

The rabbitMq VHost to which the service creating the activity is connected.

carrotTracingOptions IOptions<CarrotTracingOptions>

Options for CarrotMQ tracing.

Returns

Activity

The created Activity if successful; otherwise, null.

CreateProducerActivity(CarrotHeader, string, string, IOptions<CarrotTracingOptions>)

Creates a new Producer tracing activity.

public static Activity? CreateProducerActivity(CarrotHeader header, string serviceName, string vhost, IOptions<CarrotTracingOptions> carrotTracingOptions)

Parameters

header CarrotHeader

The CarrotMQ header containing tracing information.

serviceName string

The name of the service creating the activity.

vhost string

The rabbitMq VHost to which the service creating the activity is connected.

carrotTracingOptions IOptions<CarrotTracingOptions>

Options for CarrotMQ tracing.

Returns

Activity

The created Activity if successful; otherwise, null.