diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-24 15:35:55 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-24 15:35:55 -0800 |
commit | 992e478cb2f8b79b1acc8d26e9ee3ade3132fdfb (patch) | |
tree | c0ecec91e4669138c1d5c7a73c786f990dfe529e /src | |
parent | b76447cf44959bb1e2aedf7c8766ca2024706e0d (diff) | |
download | DotNetOpenAuth-992e478cb2f8b79b1acc8d26e9ee3ade3132fdfb.zip DotNetOpenAuth-992e478cb2f8b79b1acc8d26e9ee3ade3132fdfb.tar.gz DotNetOpenAuth-992e478cb2f8b79b1acc8d26e9ee3ade3132fdfb.tar.bz2 |
Added several more areas to reporting.
Diffstat (limited to 'src')
7 files changed, 21 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/OpenId/Behaviors/GsaIcamProfile.cs b/src/DotNetOpenAuth/OpenId/Behaviors/GsaIcamProfile.cs index 23377c8..20c207f 100644 --- a/src/DotNetOpenAuth/OpenId/Behaviors/GsaIcamProfile.cs +++ b/src/DotNetOpenAuth/OpenId/Behaviors/GsaIcamProfile.cs @@ -114,6 +114,8 @@ namespace DotNetOpenAuth.OpenId.Behaviors { !requestInternal.AppliedExtensions.OfType<FetchRequest>().Any()), BehaviorStrings.PiiIncludedWithNoPiiPolicy); } + + Reporting.RecordEventOccurrence(this, "RP"); } /// <summary> @@ -256,6 +258,8 @@ namespace DotNetOpenAuth.OpenId.Behaviors { } } } + + Reporting.RecordEventOccurrence(this, "OP"); } return result; diff --git a/src/DotNetOpenAuth/OpenId/Behaviors/PpidGeneration.cs b/src/DotNetOpenAuth/OpenId/Behaviors/PpidGeneration.cs index baef943..a465611 100644 --- a/src/DotNetOpenAuth/OpenId/Behaviors/PpidGeneration.cs +++ b/src/DotNetOpenAuth/OpenId/Behaviors/PpidGeneration.cs @@ -108,6 +108,8 @@ namespace DotNetOpenAuth.OpenId.Behaviors { if (!papeResponse.ActualPolicies.Contains(AuthenticationPolicies.PrivatePersonalIdentifier)) { papeResponse.ActualPolicies.Add(AuthenticationPolicies.PrivatePersonalIdentifier); } + + Reporting.RecordEventOccurrence(this, string.Empty); } } diff --git a/src/DotNetOpenAuth/OpenId/Provider/AuthenticationRequest.cs b/src/DotNetOpenAuth/OpenId/Provider/AuthenticationRequest.cs index a229488..d22f858 100644 --- a/src/DotNetOpenAuth/OpenId/Provider/AuthenticationRequest.cs +++ b/src/DotNetOpenAuth/OpenId/Provider/AuthenticationRequest.cs @@ -45,6 +45,8 @@ namespace DotNetOpenAuth.OpenId.Provider { // If the openid.claimed_id is present, and if it's different than the openid.identity argument, then // the RP has discovered a claimed identifier that has delegated authentication to this Provider. this.IsDelegatedIdentifier = this.ClaimedIdentifier != null && this.ClaimedIdentifier != this.LocalIdentifier; + + Reporting.RecordEventOccurrence("AuthenticationRequest.IsDelegatedIdentifier", this.IsDelegatedIdentifier.ToString()); } #region HostProcessedRequest members diff --git a/src/DotNetOpenAuth/OpenId/Provider/HostProcessedRequest.cs b/src/DotNetOpenAuth/OpenId/Provider/HostProcessedRequest.cs index 38d1094..ec0c58a 100644 --- a/src/DotNetOpenAuth/OpenId/Provider/HostProcessedRequest.cs +++ b/src/DotNetOpenAuth/OpenId/Provider/HostProcessedRequest.cs @@ -39,6 +39,7 @@ namespace DotNetOpenAuth.OpenId.Provider { Contract.Requires<ArgumentNullException>(provider != null); this.negativeResponse = new NegativeAssertionResponse(request, provider.Channel); + Reporting.RecordEventOccurrence(this, request.Realm); } #region IHostProcessedRequest Properties diff --git a/src/DotNetOpenAuth/OpenId/Provider/OpenIdProvider.cs b/src/DotNetOpenAuth/OpenId/Provider/OpenIdProvider.cs index 4955611..827ca6c 100644 --- a/src/DotNetOpenAuth/OpenId/Provider/OpenIdProvider.cs +++ b/src/DotNetOpenAuth/OpenId/Provider/OpenIdProvider.cs @@ -403,6 +403,7 @@ namespace DotNetOpenAuth.OpenId.Provider { } } + Reporting.RecordEventOccurrence(this, "PrepareUnsolicitedAssertion"); return this.Channel.PrepareResponse(positiveAssertion); } @@ -515,6 +516,7 @@ namespace DotNetOpenAuth.OpenId.Provider { private void OnBehaviorsChanged(object sender, NotifyCollectionChangedEventArgs e) { foreach (IProviderBehavior profile in e.NewItems) { profile.ApplySecuritySettings(this.SecuritySettings); + Reporting.RecordFeatureUse(profile); } } } diff --git a/src/DotNetOpenAuth/XrdsPublisher.cs b/src/DotNetOpenAuth/XrdsPublisher.cs index 332e3fa..e7c04d8 100644 --- a/src/DotNetOpenAuth/XrdsPublisher.cs +++ b/src/DotNetOpenAuth/XrdsPublisher.cs @@ -95,6 +95,13 @@ namespace DotNetOpenAuth { /// </summary> private const string EnabledViewStateKey = "Enabled"; + /// <summary> + /// Initializes a new instance of the <see cref="XrdsPublisher"/> class. + /// </summary> + public XrdsPublisher() { + Reporting.RecordFeatureUse(this); + } + #region Properties /// <summary> diff --git a/src/DotNetOpenAuth/Yadis/Yadis.cs b/src/DotNetOpenAuth/Yadis/Yadis.cs index a9a573b..589a155 100644 --- a/src/DotNetOpenAuth/Yadis/Yadis.cs +++ b/src/DotNetOpenAuth/Yadis/Yadis.cs @@ -73,6 +73,7 @@ namespace DotNetOpenAuth.Yadis { CachedDirectWebResponse response2 = null; if (IsXrdsDocument(response)) { Logger.Yadis.Debug("An XRDS response was received from GET at user-supplied identifier."); + Reporting.RecordEventOccurrence("Yadis", "XRDS in initial response"); response2 = response; } else { string uriString = response.Headers.Get(HeaderName); @@ -80,12 +81,14 @@ namespace DotNetOpenAuth.Yadis { if (uriString != null) { if (Uri.TryCreate(uriString, UriKind.Absolute, out url)) { Logger.Yadis.DebugFormat("{0} found in HTTP header. Preparing to pull XRDS from {1}", HeaderName, url); + Reporting.RecordEventOccurrence("Yadis", "XRDS referenced in HTTP header"); } } if (url == null && response.ContentType != null && (response.ContentType.MediaType == ContentTypes.Html || response.ContentType.MediaType == ContentTypes.XHtml)) { url = FindYadisDocumentLocationInHtmlMetaTags(response.GetResponseString()); if (url != null) { Logger.Yadis.DebugFormat("{0} found in HTML Http-Equiv tag. Preparing to pull XRDS from {1}", HeaderName, url); + Reporting.RecordEventOccurrence("Yadis", "XRDS referenced in HTML"); } } if (url != null) { |