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

[V2]Add Script for metrics markdown table #5941

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vvs-personalstash
Copy link
Contributor

@vvs-personalstash vvs-personalstash commented Sep 5, 2024

Description of the changes

  • Added a script for creating a markdown table to view and compare v1 and v2 metrics using json generated by compare metrics

Checklist

Signed-off-by: vvs-personalstash <[email protected]>
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.81%. Comparing base (08ae568) to head (a51e374).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5941      +/-   ##
==========================================
+ Coverage   91.04%   96.81%   +5.76%     
==========================================
  Files         345      345              
  Lines       18062    16528    -1534     
==========================================
- Hits        16445    16001     -444     
+ Misses       1430      340    -1090     
  Partials      187      187              
Flag Coverage Δ
badger_v1 8.03% <ø> (ø)
badger_v2 1.82% <ø> (ø)
cassandra-3.x-v1 16.62% <ø> (ø)
cassandra-3.x-v2 1.75% <ø> (ø)
cassandra-4.x-v1 16.62% <ø> (+1.16%) ⬆️
cassandra-4.x-v2 1.75% <ø> (ø)
elasticsearch-6.x-v1 18.79% <ø> (ø)
elasticsearch-7.x-v1 18.84% <ø> (ø)
elasticsearch-8.x-v1 19.03% <ø> (ø)
elasticsearch-8.x-v2 1.82% <ø> (ø)
grpc_v1 9.49% <ø> (+0.56%) ⬆️
grpc_v2 7.16% <ø> (ø)
kafka-v1 9.74% <ø> (ø)
kafka-v2 1.82% <ø> (ø)
memory_v2 1.82% <ø> (ø)
opensearch-1.x-v1 18.90% <ø> (+0.33%) ⬆️
opensearch-2.x-v1 18.89% <ø> (-0.02%) ⬇️
opensearch-2.x-v2 1.81% <ø> (-0.02%) ⬇️
tailsampling-processor 0.46% <ø> (ø)
unittests 95.29% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Wise-Wizard
Copy link
Contributor

In terminal, run make fmt and push again.

@@ -0,0 +1,101 @@
import json
Copy link
Member

Choose a reason for hiding this comment

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

  • move this into script/utils
  • please document how to use that
  • include generated MD file(s) - you can put then under cmd/jaeger/docs/migration

Signed-off-by: vvs-personalstash <[email protected]>

| Metric Name | Inner Parameters |
|-------------|------------------|
| go_gc_duration_seconds | |
Copy link
Member

Choose a reason for hiding this comment

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

@Wise-Wizard we should investigate how these standard Go metrics are being generated in v1 and decide how we can enable them in v2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, will look in that

Copy link
Member

Choose a reason for hiding this comment

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

this is what we might want: https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/instrumentation/runtime/runtime.go

ideally Collector would expose those automatically, but it's not implemented currently -- open-telemetry/opentelemetry-collector#2155

@@ -0,0 +1,92 @@
### Common Metrics

| Metric Name | Inner Parameters |
Copy link
Member

Choose a reason for hiding this comment

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

Inner Parameters

The official term in Prometheus is Labels

print('Dict successfully converted to md')

# Usage
fn = '' #Enter the path of the JSON file generated by compare_metrics.py
Copy link
Member

@yurishkuro yurishkuro Sep 7, 2024

Choose a reason for hiding this comment

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

  1. let's move compare_metrics.py to utils too.
  2. could we just add the logic here to compare_metrics.py ? Maybe as an optional parameter --out=json|md

Copy link
Member

Choose a reason for hiding this comment

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

  1. I still don't see instructions how to run these things - the compare_metrics.py seems to hardcode the input file names like ./V1_Metrics.json -- please document how those JSON files should be produced.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok should i create a separate documentation md file for this in scripts/utils or should i just add the instruction as comments

Copy link
Member

Choose a reason for hiding this comment

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

in comments is fine, this isn't something we'd use often

| processor_batch_timeout_trigger_send | processor, service_instance_id, service_name, service_version |
| receiver_accepted_spans | receiver, service_instance_id, service_name, service_version, transport |
| receiver_refused_spans | receiver, service_instance_id, service_name, service_version, transport |
| target_info | service_instance_id, service_name, service_version |
Copy link
Member

Choose a reason for hiding this comment

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

arguably this is equivalent to jaeger_build_info


| Metric Name | Inner Parameters |
|-------------|------------------|
| jaeger_badger_compaction_current_num_lsm | |
Copy link
Member

Choose a reason for hiding this comment

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

the storage-specific files will have large overlap with all-in-one, I recommend filtering out only the storage-related metrics.

@@ -0,0 +1,92 @@
### Common Metrics
Copy link
Member

Choose a reason for hiding this comment

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

could we just have a single table with a format similar to ### Equivalent Metrics? When one side is missing, put n/a

@yurishkuro yurishkuro added the changelog:exprimental Change to an experimental part of the code label Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:exprimental Change to an experimental part of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants