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

Trace Analyzer Command Line #54

Merged
merged 17 commits into from
Oct 4, 2023
Merged

Trace Analyzer Command Line #54

merged 17 commits into from
Oct 4, 2023

Conversation

lquerel
Copy link
Contributor

@lquerel lquerel commented Sep 29, 2023

For a more complete description of this tool, check this link.

This tool is designed for trace analysis and the generation of statistical
reports. Its primary function is to ascertain how a given trace dataset is
encoded using the OTel Arrow Protocol.

To view statistics for all .zst files, use the command below. These files should
be in JSON format, compressed with ZSTD and bearing the .zst extension. Batches
are configured to handle 2,000 spans.

go run tools/traces_analyzer/main.go -format json -batch-size 2000 -all *.zst

Supported flags

By default, there is no flag enabled. All these flags are cumulative.

Flag Description
-schema-stats Display Arrow schema statistics
-record-stats Display Arrow record statistics
-schema-updates Display Arrow schema updates
-producer-stats Display OTel Arrow producer statistics
-compression-ratio Display compression ratio per record type
-all Display all statistics and updates

Supported formats

Use the -format option to specify the format of your input file.

Format Description
json JSON format (compressed with ZSTD and with extension .zst)
proto Protobuf format

Dump data per record type

Use these options to dump rows per Arrow record type (e.g. spans, span-attrs, ...).

Note: These options require the -record-stats flag to be enabled.

Option Description
-spans=<#rows> Number of spans to display per Arrow record
-resource-attrs=<#rows> Number of resource attributes to display per Arrow record
-span-attrs=<#rows> Number of span attributes to display per Arrow record
-span-events=<#rows> Number of span events to display per Arrow record
-span-links=<#rows> Number of span links to display per Arrow record
-span-event-attrs=<#rows> Number of span event attributes to display per Arrow record
-span-link-attrs=<#rows> Number of span link attributes to display per Arrow record

Test sorting

The option -test-sorting can be used to test all the combinations of sorting
arrow records. This option is useful to ensure that the default sorting is
working correctly.

Note: This option should not be combined with any other option.

@lquerel lquerel marked this pull request as ready for review October 3, 2023 23:19
Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

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

I checked out the branch and ran it. Looks good.

@lquerel lquerel merged commit 3ef4029 into open-telemetry:main Oct 4, 2023
1 check passed
@jmacd jmacd mentioned this pull request Oct 6, 2023
jmacd added a commit that referenced this pull request Oct 6, 2023
Since we still do not have a changelog automation, this is what is
included since v0.3.0 worthy of note:

#47
#52
#53 
#54 
#55 
#56
#57 

README improvements,
Obfuscation processor fixes.
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