Class IDataInspector

Class Documentation

class Microsoft::Applications::Events::IDataInspector

This interface allows SDK users to register a data inspector that will inspect the data being uploaded by the SDK.

Public Functions

virtual ~IDataInspector() = default

Default virtual destructor

virtual void SetEnabled(bool isEnabled) noexcept = 0

Set the enabled state at runtime for the inspector.

Parameters

isEnabled – Boolean value to denote whether the inspector is enabled or not.

virtual bool IsEnabled() const noexcept = 0

Get the current state for the inspector.

Returns

True if the data inspector is enabled, False otherwise.

virtual bool InspectRecord(::CsProtocol::Record &record) noexcept = 0

Iterate and inspect the given record’s Part-B and Part-C properties

Parameters

record – Record to inspect

Returns

Always returns true.

virtual void InspectSemanticContext(const std::string &contextName, const std::string &contextValue, bool isGlobalContext, const std::string &associatedTenant) noexcept = 0

Inspect an ISemanticContext value.

Parameters
  • contextName – Name of the Context

  • contextValue – Value of the Context

  • isGlobalContext – Whether this is a global/logmanager Context or local ILogger context

  • associatedTenant – (Optional) Tenant associated with the Context

virtual void InspectSemanticContext(const std::string &contextName, GUID_t contextValue, bool isGlobalContext, const std::string &associatedTenant) noexcept = 0

Inspect an ISemanticContext value.

Parameters
  • contextName – Name of the Context

  • contextValue – Value of the Context

  • isGlobalContext – Whether this is a global/logmanager Context or local ILogger context

  • associatedTenant – (Optional) Tenant associated with the Context

virtual const char *GetName() const noexcept = 0

Returns unique name for current Data Inspector

Returns

Name of Data Inspector