-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Exporter.Prometheus] - enable analysis #6171
Open
Kielek
wants to merge
40
commits into
open-telemetry:main
Choose a base branch
from
Kielek:analysis-OpenTelemetry.Exporter.Prometheus
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
fcd5133
[Exporter.Prometheus] enable code analysis
Kielek dc1faa5
CA1822
Kielek 5a4c569
CA1310
Kielek 6cbb691
Disable CA2000 - ownership is transferred to other objects
Kielek 9ceef3a
CA1859
Kielek c26527a
CA1823
Kielek 34e363b
CA1835
Kielek c36a8a4
IDE0300
Kielek 5c50b48
IDE0301
Kielek 325db5b
IDE0090
Kielek 72d7bd8
IDE0074
Kielek bf04484
IDE0028
Kielek b3fb89d
IDE0032
Kielek c412172
CA1062
Kielek 260277c
Enable for tests
Kielek ede8224
CA1305 - Tests
Kielek 582479e
CA1307 - Tests
Kielek 45cf3ae
CA1310 - Tests
Kielek 6f8db2c
CA1825 - Tests
Kielek 0b270a7
CA1822 - Tests
Kielek 984c4ed
IDE0301 - Tests
Kielek 0f48075
IDE0305 - Tests
Kielek bf0ff33
IDE0046 - Tests
Kielek bf4fbf5
CS4032
Kielek f381f7e
CA1852 - Tests
Kielek d763a8e
CA1860 - Tests
Kielek 5eacfb3
CS0176 - Tests
Kielek 65d7460
CA2213 - Tests
Kielek 781c1cf
CA2234 - Tests
Kielek 515e7df
CA2201 - Tests
Kielek 6d36eeb
Ignore CA2000 - Tests - it should be disposed by other object
Kielek 26acef7
Disable CA2007 for tests
Kielek eee5b5f
Disable CA5394 - nothing to secure here
Kielek 1fae378
IDE0028 - Tests
Kielek 665de90
CA1852 - Tests
Kielek 60109a1
CA1515 - Tests
Kielek 6023b6c
Fix parsing Uri - tests
Kielek 19a2212
#pragma warning description
Kielek e3e501b
Avoid same names in different contexts
Kielek 3038ff0
Disable CA1849
Kielek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,9 +62,11 @@ public static MeterProviderBuilder AddPrometheusExporter( | |
}); | ||
} | ||
|
||
private static MetricReader BuildPrometheusExporterMetricReader(PrometheusAspNetCoreOptions options) | ||
private static BaseExportingMetricReader BuildPrometheusExporterMetricReader(PrometheusAspNetCoreOptions options) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI
|
||
{ | ||
#pragma warning disable CA2000 // Dispose objects before losing scope | ||
var exporter = new PrometheusExporter(options.ExporterOptions); | ||
#pragma warning restore CA2000 // Dispose objects before losing scope | ||
|
||
return new BaseExportingMetricReader(exporter) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you intend to disable this for the entire repo or scope it to just the test projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests only. It is done automatically by xunit, but CI executes dotnet format without restoring packages so it cannot be injected by xunit package.