Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Fix Func injection issue on structuremap and track MVC page names #489

Merged
merged 3 commits into from
Jul 7, 2017

Conversation

pakrym
Copy link
Contributor

@pakrym pakrym commented Jul 6, 2017

Instead of injecting Func<,> factory interface is introduced.

OperationName from MVC Razor Page is generated the same way controller/action is makes for simpler code change and consistent behavior.

#482
#430

@dnduffy

@@ -51,9 +52,9 @@ public void Configure(TelemetryConfiguration configuration)

if (this.telemetryProcessorFactories.Any())
{
foreach (Func<ITelemetryProcessor, ITelemetryProcessor> processorFactory in this.telemetryProcessorFactories)
foreach (ITelemetryProcessorFactory processorFactory in this.telemetryProcessorFactories)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about existing TelemetryProcessors that were created the old way? This seems like something that should go into 2.2 and not 2.1.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not about how TelemetryProcessors were created but how they were registered in DI. Not sure how wide of an adoption this feature got.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @karolz-ms and @pharring are using it.
I agree it is a good change, I just don't think it belongs in this "hotfix" release of bug fixes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be a small, but breaking change for the exception exemplification feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this fix is not shipped with AspNetCore 2.0, any application using structure map would be broken because we inject AI everywhere by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "structure map"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karolz-ms AspNetCore allows usage of third party DI containers if they support common basic set of features. http://structuremap.github.io/ is one of these containers.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snapshot Collector ("exception exemplification") doesn't reference this repo. It references the base repo. This won't be a breaking change for us. We'll just have to update our docs.

Copy link
Member

@dnduffy dnduffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes look good but I think the ITelemetryProcessorFactory should go into 2.2 instead of 2.1.1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants