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

Log metric data points in logging exporter #1258

Merged
merged 3 commits into from
Jul 3, 2020
Merged

Log metric data points in logging exporter #1258

merged 3 commits into from
Jul 3, 2020

Conversation

nilebox
Copy link
Member

@nilebox nilebox commented Jul 3, 2020

Description:
Log metric data points in logging exporter.
Currently only resource labels are being logged.

Link to tracking Issue: -

Testing: Unit tests + tested manually:

ResourceMetrics #0
Resource labels:
     -> resource-attr: STRING(resource-attr-val-1)
InstrumentationLibraryMetrics #0
Metric #0
Descriptor:
     -> Name: counter-int
     -> Description: 
     -> Unit: 1
     -> Type: MONOTONIC_INT64
Int64DataPoints #0
Data point labels:
     -> label-1: label-value-1
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Value: 123
Int64DataPoints #1
Data point labels:
     -> label-2: label-value-2
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Value: 456
Metric #1
Descriptor:
     -> Name: counter-double
     -> Description: 
     -> Unit: 1
     -> Type: MONOTONIC_DOUBLE
DoubleDataPoints #0
Data point labels:
     -> label-1: label-value-1
     -> label-2: label-value-2
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Value: 1.230000
DoubleDataPoints #1
Data point labels:
     -> label-1: label-value-1
     -> label-3: label-value-3
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Value: 4.560000
Metric #2
Descriptor:
     -> Name: cumulative-histogram
     -> Description: 
     -> Unit: 1
     -> Type: HISTOGRAM
HistogramDataPoints #0
Data point labels:
     -> label-1: label-value-1
     -> label-3: label-value-3
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Count: 1
Sum: 15.000000
HistogramDataPoints #1
Data point labels:
     -> label-2: label-value-2
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Count: 1
Sum: 15.000000
Buckets #0, Count: 0
Buckets #1, Count: 1
ExplicitBounds #0: 1.000000
Metric #3
Descriptor:
     -> Name: summary
     -> Description: 
     -> Unit: 1
     -> Type: SUMMARY
SummaryDataPoints #0
Data point labels:
     -> label: label-value-1
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Count: 1
Sum: 15.000000
SummaryDataPoints #1
Data point labels:
     -> label: label-value-2
StartTime: 1581452772000000321
Timestamp: 1581452773000000789
Count: 1
Sum: 15.000000
ValueAtPercentiles #0, Value: 15.000000, Percentile: 1.000000

Documentation: -

@bogdandrutu
Copy link
Member

Please fix the lint errors

@nilebox nilebox changed the title Log metric data point labels in logging exporter Log metric data points in logging exporter Jul 3, 2020
@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #1258 into master will increase coverage by 0.09%.
The diff coverage is 97.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1258      +/-   ##
==========================================
+ Coverage   88.50%   88.60%   +0.09%     
==========================================
  Files         207      207              
  Lines       14945    15109     +164     
==========================================
+ Hits        13227    13387     +160     
- Misses       1286     1288       +2     
- Partials      432      434       +2     
Impacted Files Coverage Δ
exporter/loggingexporter/logging_exporter.go 89.17% <95.55%> (+5.48%) ⬆️
internal/data/testdata/metric.go 100.00% <100.00%> (ø)
translator/internaldata/resource_to_oc.go 81.39% <0.00%> (-2.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2049a41...63302c3. Read the comment docs.

@nilebox
Copy link
Member Author

nilebox commented Jul 3, 2020

@bogdandrutu added logging for data point values, fixed lint errors, increased code coverage.

@bogdandrutu bogdandrutu merged commit 117cf7a into open-telemetry:master Jul 3, 2020
wyTrivail pushed a commit to mxiamxia/opentelemetry-collector that referenced this pull request Jul 13, 2020
* Log metric data point labels in logging exporter

* Add logging for data point values

* Add test case with empty data points
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
* Add delegating global propagator

* Add Changes to CHANGELOG

* Add PR number to CHANGELOG

* Add tests using new test framework

* Revert "Add tests using new test framework"

This reverts commit af7ae17436f2bd5e8e120bcbe9d07be904338d08.
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
* Update the internal global TextMapPropagator

Include feedback from a post-merge review of open-telemetry#1258

* Apply feedback

* Update api/global/internal/propagator.go

Co-authored-by: Steven E. Harris <seh@panix.com>

Co-authored-by: Steven E. Harris <seh@panix.com>
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.

None yet

2 participants