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

New component: telemetrygen #9597

Closed
3 tasks done
mx-psi opened this issue May 2, 2022 · 9 comments
Closed
3 tasks done

New component: telemetrygen #9597

mx-psi opened this issue May 2, 2022 · 9 comments
Labels
Accepted Component New component has been sponsored cmd/telemetrygen telemetrygen command data:metrics Metric related issues enhancement New feature or request

Comments

@mx-psi
Copy link
Member

mx-psi commented May 2, 2022

Writing this as a new component proposal, even though this is a separate tool like tracegen and not something that would be added to the collector binary

The purpose and use-cases of the new component

Similar to tracegen (see #955) a new telemetrygen tool with support for metrics would be useful for generating a controlled stream of metrics of a given type. This would be useful for:

  • local testing, development and troubleshooting
  • demos
  • load testing
  • creating examples and showcasing how to use the Collector in different scenarios
  • automated end to end testing

tracegen is currently provided both as a binary and Docker image. While we don't have exact usage numbers, the Docker image seems to average ~10 downloads per day and there is user interest on keeping the tool working and adding new features as demonstrated by issues like #7308, #7080 and #6671. We expect metricgen would have similar user adoption.

Existing solutions (e.g. using a language library) lack support for legacy metric types like summaries and are cumbersome to use for load testing.

Example configuration for the component

As much as possible, the new tool would adopt the CLI interface from tracegen (by creating a common internal module used by both tools). When generating metrics, it would need to have options for specifying the OTLP metric type to be generated, its aggregation temporality and monotonicity. As an example (modulo defaults and name bikesheding to be decided during implementation):

# Generate default metric type (gauge) for the specified duration
telemetrygen metrics -otlp-insecure -duration 5s

# Generate cumulative monotonic sums indefinitely
telemetrygen metrics -otlp-insecure -type sum -temporality cumulative -monotonic 

Telemetry data types supported

telemetrygen would support traces (by including the code from tracegen) and we would add support for metrics. Eventually, logs support could be added too.

All metric types should be supported, including those that are not generated by language libraries like Summaries.

Sponsor (Optional)

I am happy to sponsor this. Other Datadog employees will contribute in the development and maintenance.

Roadmap

This roadmap will be kept updated to track issues related to telemetrygen.

Phase 1: Moving from tracegen to telemetrygen

@mx-psi
Copy link
Member Author

mx-psi commented May 2, 2022

@open-telemetry/collector-contrib-approvers, two questions about this:

  1. Do you think this needs a sponsor (given it is not a component but a separate tool)? If it needs one, should be someone other than me (or at least a separate approver that says 'this makes sense to add to this repo')? I will review PRs and be a codeowner regardless, but it feels weird to write a proposal and automatically approve it just because I am an approver.
  2. Do you think this should be a separate tool, or would it make sense to unify tracegen and metricgen into a single otlpgen tool?

@mx-psi mx-psi added enhancement New feature or request data:metrics Metric related issues labels May 2, 2022
@codeboten
Copy link
Contributor

I think having this become a telemetrygen makes sense to me, as it's likely the same tool would also be useful for logs. I'm happy to sponsor it.

@bogdandrutu
Copy link
Member

+1 for one telemetrygen binary. Consider also to move it to /cmd/telemetrygen, maybe we can also publish the docker :)

@TylerHelmuth
Copy link
Member

Publishing an image would be awesome

@mx-psi mx-psi added the Accepted Component New component has been sponsored label May 11, 2022
@mx-psi mx-psi changed the title New component: metricgen New component: telemetrygen May 11, 2022
@mx-psi mx-psi added the cmd/telemetrygen telemetrygen command label May 30, 2022
@spencergilbert
Copy link

I didn't see a separate issue for telemetrygen logs - should that be included here or raised in another issue?

@mx-psi
Copy link
Member Author

mx-psi commented Aug 3, 2022

I didn't see a separate issue for telemetrygen logs - should that be included here or raised in another issue?

I think this should be a separate issue

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jan 9, 2023
@TylerHelmuth TylerHelmuth removed the Stale label Jan 9, 2023
codeboten pushed a commit that referenced this issue Jan 11, 2023
- Copies tracegen functionality to an internal package in telemetrygen
- Moves telemetrygen config from internal to main package in order to import internal traces package
- Copies existing Github actions from tracegen for telemetrygen
- Marks tracegen module as deprecated

Link to tracking Issue: #9597

Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
@atoulme
Copy link
Contributor

atoulme commented Mar 12, 2023

All 3 subtasks are complete, shall we close this issue?

@mx-psi
Copy link
Member Author

mx-psi commented Mar 13, 2023

I think we can close this yes

@mx-psi mx-psi closed this as completed Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored cmd/telemetrygen telemetrygen command data:metrics Metric related issues enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants