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

feat: add byte rate to producer API #6579

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

shivanshuraj1333
Copy link
Member

@shivanshuraj1333 shivanshuraj1333 commented Dec 3, 2024

fixes: https://github.com/SigNoz/engineering-pod/issues/2056


Important

Add byte rate metric to producer throughput overview in the producer API, updating query parameters and functions accordingly.

  • Behavior:
    • Add byte rate metric to producer throughput overview in getProducerThroughputOverview() in http_handler.go.
    • Update query context to producer-throughput-overview-byte-rate in BuildQRParamsWithCache() in translator.go.
  • Query Parameters:
    • Rename queryRangeParams to producerQueryRangeParams in getProducerThroughputOverview() in http_handler.go.
    • Update buildBuilderQueriesProducerBytes() to use byte_rate as query name in translator.go.
  • Misc:
    • Change latencyColumn to byte_rate in getProducerThroughputOverview() in http_handler.go.
    • Update PanelType to Table in BuildQRParamsWithCache() in translator.go.

This description was created by Ellipsis for d016e49. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to d016e49 in 1 minute and 48 seconds

More details
  • Looked at 164 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 4 drafted comments based on config settings.
1. pkg/query-service/app/http_handler.go:3202
  • Draft comment:
    The variable name latencySeries is misleading as it now deals with byte rate. Consider renaming it to byteRateSeries for clarity.
  • Reason this comment was not posted:
    Marked as duplicate.
2. pkg/query-service/app/http_handler.go:3221
  • Draft comment:
    The function postprocess.TransformToTableForBuilderQueries is used for transforming the resultFetchLatency. Ensure that this function is appropriate for handling byte rate data as well.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR changes the query context from 'producer-throughput-overview-latency' to 'producer-throughput-overview-byte-rate'. However, the function name and variable names still refer to latency, which can be misleading. This should be updated to reflect the new context of byte rate.
3. pkg/query-service/app/integrations/messagingQueues/kafka/translator.go:283
  • Draft comment:
    The function buildBuilderQueriesProducerBytes is used for building queries related to byte rate. Ensure that this function is appropriate for handling byte rate data as well.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR changes the query context from 'producer-throughput-overview-latency' to 'producer-throughput-overview-byte-rate'. However, the function name and variable names still refer to latency, which can be misleading. This should be updated to reflect the new context of byte rate.
4. pkg/query-service/app/integrations/messagingQueues/kafka/translator.go:279
  • Draft comment:
    Avoid using the component/index.tsx file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_BwmxoRJ4eh9MoGAi


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

pkg/query-service/app/http_handler.go Outdated Show resolved Hide resolved
@srikanthccv
Copy link
Member

I see there is still a list panel type for one specific query https://github.com/shivanshuraj1333/signoz/blob/5e44803e47bbf95e54644e183a602a10b14da97b/pkg/query-service/app/integrations/messagingQueues/kafka/translator.go#L375. trying to understand, why do keep some for the table and some list?

@shivanshuraj1333
Copy link
Member Author

the code that you highlighted is not used in the api/v1/messaging-queues/kafka/topic-throughput/producer API.
This API uses trace and metrics queries which under the hood uses table type table only.

For the highlighted one, it makes sense to use list, and it's powering another API api/v1/messaging-queues/kafka/span/evaluation

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