다음을 통해 공유


TelemetryActivity Class

Definition

[OBSOLETE] Please use data model TelemetryScope<T> to track performance in dev15 and above releases. More details is at http://aka.ms/datamodel.

public ref class TelemetryActivity sealed : Microsoft::VisualStudio::Telemetry::TelemetryEvent
public sealed class TelemetryActivity : Microsoft.VisualStudio.Telemetry.TelemetryEvent
type TelemetryActivity = class
    inherit TelemetryEvent
Public NotInheritable Class TelemetryActivity
Inherits TelemetryEvent
Inheritance
TelemetryActivity

Constructors

TelemetryActivity(String, Guid)

Creates a new telemetry activity parented to another activity

TelemetryActivity(String)

Creates the new telemetry activity class.

Properties

Correlation

Gets correlation of this event. It represents this event when correlated with other events.

(Inherited from TelemetryEvent)
CorrelationId

Gets activity correlation id for the current activity

DataSource

Gets data source.

(Inherited from TelemetryEvent)
EventSchemaVersion

Gets schema version for this event.

(Inherited from TelemetryEvent)
EventType

Gets event type for this event

(Inherited from TelemetryEvent)
HasProperties

Gets a value indicating whether properties already created.

(Inherited from TelemetryEvent)
IsOptOutFriendly

Gets or sets a value indicating whether event is friendly for the optOut session. By default it is false. If it is OptOut friendly it passes through with the event specific properties only. This behaviour can be changed by manifest rules.

(Inherited from TelemetryEvent)
Name

Gets current event name

(Inherited from TelemetryEvent)
Properties

Gets a dictionary of event properties. Properties are dimensions that aggregated data can be sliced by. The key is a property name that is unique, not null and not empty. The value is any object that represents a property value. Telemetry channels must use value.ToString(CultureInfo.InvariantCulture) to send the value to a server as a string.

(Inherited from TelemetryEvent)
Severity

Gets or sets a severity level of the event. The level is used for event consumer (e.g., ETW provider, backend reporting) to organize data easier.

(Inherited from TelemetryEvent)
SharedPropertyBags

Gets shared property bags

(Inherited from TelemetryEvent)

Methods

Correlate(TelemetryEventCorrelation[])

Correlate this event with other events via TelemetryEventCorrelation.

(Inherited from TelemetryEvent)
CorrelateWithDescription(TelemetryEventCorrelation, String)

Correlate this event with other event via TelemetryEventCorrelation with description information.

(Inherited from TelemetryEvent)
End()

Marks the activity as ended and registers the current timestamp

End(TimeSpan)

Marks the activity as ended and sets the duration and start time per given the duration

GetDefaultEventProperties(Int64, Int64, String)

Returns default properties that should be on each TelemetryEvent

(Inherited from TelemetryEvent)
Start()

Marks the activity as began and registers the current timestamp

ToString()

ToString to make debugging easier: show in debug watch window

(Inherited from TelemetryEvent)

Applies to