Dotfuscator User's Guide
FeatureAttribute

Summary

A FeatureAttribute is an instrumentation time custom attribute for Application Analytics processing.  Dotfuscator will insert code into the attributed method that sends PreEmptive Analytics feature messages.

Dotfuscator will remove this custom attribute from the metadata after instrumentation.

Feature Event Types

Features can be defined as one time only events (Ticks), or they can be defined with separate Stop and Start events. The event type you choose affects the type of code Dotfuscator generates.

The Tick event results in one PreEmptive Analytics feature message being sent when the attributed method executes. For Start/Stop events, two separate messages are sent: one for start and one for stop.

To use Start/Stop events, two FeatureAttributes are required (which can go on the same method if desired). Code generated for the Start event is added at the beginning of the attributed method, while code for the Stop event is added to the end of the method.

Feature Attribute
Copy Code
public sealed class FeatureAttribute : Attribute

Constructor Members

Name Summary
FeatureAttribute(String featureName) Creates a new FeatureAttribute representing the named feature. The name of the feature should match the name of a feature or feature set specified for the product.

Property Members

Name

Summary

ExtendedKeyMethodArguements : String

A pattern indicating which parameter names and values should be automatically added to the messages' extended key data at runtime.  See Automatically Sending Method Parameters as Extended Keys for details on supported patterns.

ExtendedKeySourceElement : SourceElements

Indicates how to access the extended key dictionary at runtime, at the time that the attributed method is called (e.g. a field, property, method, or method parameter). To use this property, ExtendedKeySourceName must also be set. If ExtendedKeySourceElement is a field, method, or property, ExtendedKeySourceOwner must also be set unless the field, method or property is defined on the same class as the attributed method.

ExtendedKeySourceName : String

The name of the property, field, method, or method parameter that will contain the extended key dictionary at runtime, at the time that the attributed method is called. If this property is set, ExtendedKeySourceElement is required to be set as well. If this property is not set, Dotfuscator will not generate code to send extended key information.

ExtendedKeySourceOwner : Type

If the ExtendedKeySourceElement is a field, method or property, ExtendedKeySourceOwner indicates the name of the type that defines the field, method or property. If not set, the named source element is searched for on the attributed method’s type.

EventType : FeatureEventTypes

Describes what type of feature event this is. For analytics, Dotfuscator will send different messages based on the event type. Bracketing feature usage with Start and Stop pairs allows for tracking of time spent in the feature.

See Also

References

Instrumentation

 

 


© 2016 PreEmptive Solutions, LLC. All Rights Reserved.

www.preemptive.com