[EXPORTER] Implement in-memory metric exporter#3043
[EXPORTER] Implement in-memory metric exporter#3043lalitb merged 1 commit intoopen-telemetry:mainfrom punya:in-memory-metric-exporter
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3043 +/- ##
==========================================
+ Coverage 87.12% 87.79% +0.68%
==========================================
Files 200 195 -5
Lines 6109 5953 -156
==========================================
- Hits 5322 5226 -96
+ Misses 787 727 -60
|
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the feature.
See some preliminary comments.
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
|
Thanks for the PR. LGTM as first version. Couple of improvements I can think for future:
// Tuple: (name of the instrumentation scope, name of instrument descriptor)
// e.g. ("library_name", "metrics_name")
using InMemoryMetricDataKey = std::tuple<std::string, std::string>;
using InMemoryMetricData = std::map<
InMemoryMetricDataKey,
std::map<opentelemetry::sdk::metrics::PointAttributes, opentelemetry::sdk::metrics::PointType>>;
|
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
exporters/memory/include/opentelemetry/exporters/memory/in_memory_metric_exporter.h
Outdated
Show resolved
Hide resolved
marcalff
left a comment
There was a problem hiding this comment.
Thanks for the feature.
Please see some changes, just moving code around in different files.
|
Thanks for the comments and detailed explanations @marcalff - now I understand why the in-memory span exporter is designed the way it is. |
marcalff
left a comment
There was a problem hiding this comment.
LGTM, thanks for the feature.
Please check the CI logs and search for "error:" in maintainer builds,
and resolve remaining build warnings.
|
Also, please check the CI for include-what-you-use (iwyu), search the logs for in_memory_metric, and fix reported issues. The iwyu build is not enforced yet, but the goal is to get to 0 issues and then enforce it. For example: |
|
Thanks for the feedback. I’ll debug the CI failures over the weekend. |
This comment was marked as resolved.
This comment was marked as resolved.
|
My apologies to the maintainers for the confusing Git history (i.e. repeated force pushes). I've been trying out a different source control workflow locally and made a few mistakes. I plan to do this in a more streamlined fashion for future reviews. |
Fixes #1405
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes