Skip to content
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

Add Resource support for MetricProvider #2150

Merged
merged 2 commits into from
Jul 19, 2021

Conversation

cijothomas
Copy link
Member

Adds Resource support to MeterProvider, making it more closely aligned with TracerProvider.

@cijothomas cijothomas requested a review from a team July 17, 2021 01:51
@@ -75,6 +93,8 @@ public override ExportResult Export(in Batch<MetricItem> batch)

string time = $"{metric.StartTimeExclusive.ToLocalTime().ToString("HH:mm:ss.fff")} {metric.EndTimeInclusive.ToLocalTime().ToString("HH:mm:ss.fff")}";


Copy link
Member

Choose a reason for hiding this comment

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

nit: remove extra white lines.

@@ -20,8 +20,22 @@ namespace OpenTelemetry.Metrics
{
public abstract class MetricProcessor : BaseProcessor<MetricItem>
{
protected readonly BaseExporter<MetricItem> exporter;
Copy link
Member

Choose a reason for hiding this comment

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

nice! 👍

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

LGTM.

@codecov
Copy link

codecov bot commented Jul 19, 2021

Codecov Report

Merging #2150 (f3eaf1a) into metrics (5d6d400) will decrease coverage by 0.18%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           metrics    #2150      +/-   ##
===========================================
- Coverage    75.36%   75.18%   -0.19%     
===========================================
  Files          215      216       +1     
  Lines         6893     6910      +17     
===========================================
  Hits          5195     5195              
- Misses        1698     1715      +17     
Impacted Files Coverage Δ
...elemetry/Metrics/MeterProviderBuilderExtensions.cs 0.00% <0.00%> (ø)
...c/OpenTelemetry/Metrics/MeterProviderBuilderSdk.cs 0.00% <0.00%> (ø)
src/OpenTelemetry/Metrics/MeterProviderSdk.cs 0.00% <0.00%> (ø)
...penTelemetry/Metrics/Processors/MetricProcessor.cs 0.00% <0.00%> (ø)
...elemetry/Metrics/Processors/PullMetricProcessor.cs 0.00% <0.00%> (ø)
...elemetry/Metrics/Processors/PushMetricProcessor.cs 0.00% <0.00%> (ø)
src/OpenTelemetry/ProviderExtensions.cs 37.50% <0.00%> (-12.50%) ⬇️

@cijothomas cijothomas merged commit a4d8b35 into metrics Jul 19, 2021
@cijothomas cijothomas deleted the cijothomas/metrics_resourcesupport branch July 19, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants