dotnet / dotnet/extensions

Incorrect method name - AddServiceLogEnricher

Open
#6,504 0 comments 0 reactions 1 assignee Claimed by @evgenyfedorov2 View on GitHub
area-telemetry bug
Dominant language
C#
Stars
3.2k
Forks
894
Avg merge
1d 12h
Merged PRs (30d)
23

Description

### Description

`.AddServiceLogEnricher()` method with its overloads

https://github.com/dotnet/extensions/blob/233aa3aa17fd9e5514dbac8e6c886e47337919bd/src/Libraries/Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs#L22
https://github.com/dotnet/extensions/blob/233aa3aa17fd9e5514dbac8e6c886e47337919bd/src/Libraries/Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs#L37
https://github.com/dotnet/extensions/blob/233aa3aa17fd9e5514dbac8e6c886e47337919bd/src/Libraries/Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs#L54

have incorrect names: it should be `.AddApplicationLogEnricher()`, because the underlying class has this name https://github.com/dotnet/extensions/blob/233aa3aa17fd9e5514dbac8e6c886e47337919bd/src/Libraries/Microsoft.Extensions.Telemetry/Enrichment/ApplicationLogEnricher.cs#L12 as well as the Extensions class https://github.com/dotnet/extensions/blob/233aa3aa17fd9e5514dbac8e6c886e47337919bd/src/Libraries/Microsoft.Extensions.Telemetry/Enrichment/ApplicationEnricherServiceCollectionExtensions.cs#L14

This seems to be an oversight during some renaming from `Service*` to `Application*`.

### Reproduction Steps

n/a

### Expected behavior

Extension methods have names `.AddApplicationLogEnricher()`

### Actual behavior

Extension methods have names `.AddServiceLogEnricher()`

### Regression?

No

### Known Workarounds

n/a

### Configuration

_No response_

### Other information

Just rename the methods, probably in a non-breaking fashion - introduce new methods, deprecate old ones

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.