Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Add Prometheus metrics support for Tracing #1102

Conversation

Harkishen-Singh
Copy link
Member

@Harkishen-Singh Harkishen-Singh commented Feb 2, 2022

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

Merge requirements

Please take into account the following non-code changes that you may need to make with your PR:

  • CHANGELOG entry for user-facing changes
  • Updated the relevant documentation

@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch 4 times, most recently from f951884 to bd1da26 Compare February 3, 2022 10:30
@Harkishen-Singh Harkishen-Singh requested review from cevian, antekresic and paulfantom and removed request for cevian and antekresic February 3, 2022 10:30
@Harkishen-Singh Harkishen-Singh marked this pull request as ready for review February 3, 2022 10:30
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch 3 times, most recently from aa707cf to f9034e7 Compare February 3, 2022 11:38
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from a809013 to 4cbdf4c Compare February 4, 2022 10:27
Signed-off-by: Harkishen-Singh <[email protected]>

This commit implements Prometheus metrics for tracing module that
includes:
1. Ingest
2. Query
3. Cache

This commit also puts all shared metrics into pgmodel/metrics so that
ingestor and querier can easily access them and utilize their labels for
'type'.
Signed-off-by: Harkishen-Singh <[email protected]>

In the previous commit, we added a common metric
promscale_query_duration_seconds{handler, type} to track duration of all
query based executions across all functions (and APIs when we implement for metrics)
hence the previous
promscale_trace_fetch_traces_api_execution_duration_seconds_bucket now
becomes trivial. This commit removes it and replaces it with the new
convention so that telemetry collection does not get affected with this
update.
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 4cbdf4c to 44bf80a Compare February 4, 2022 10:51
@Harkishen-Singh Harkishen-Singh changed the title Instrument metrics for tracing path Add Prometheus metrics support for Tracing Feb 4, 2022
@Harkishen-Singh Harkishen-Singh self-assigned this Feb 4, 2022
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 44bf80a to 5ee0244 Compare February 4, 2022 11:19
Copy link
Member

@antekresic antekresic left a comment

Choose a reason for hiding this comment

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

Code structure changes to make it more readable.

Copy link
Member

@antekresic antekresic left a comment

Choose a reason for hiding this comment

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

Sorry, hit approve by mistake earlier.

@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 886c4af to 13738b2 Compare February 4, 2022 13:09
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 13738b2 to 548f7f5 Compare February 4, 2022 13:11
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 548f7f5 to 0261f72 Compare February 8, 2022 07:09
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 0261f72 to 3330793 Compare February 8, 2022 10:45
Copy link
Contributor

@paulfantom paulfantom left a comment

Choose a reason for hiding this comment

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

:shipit:

Signed-off-by: Harkishen-Singh <[email protected]>

As per the design doc, now type can have ['metric', 'trace'].
This commit ensures the same, leaving subsystem for ['metric_batcher',
'copier'] which will be implemented in another PR that will be
responsible to update all metric path based metrics.
@Harkishen-Singh Harkishen-Singh force-pushed the instrument-metrics-for-tracing-path branch from 3330793 to a95c683 Compare February 8, 2022 11:40
@Harkishen-Singh Harkishen-Singh enabled auto-merge (rebase) February 8, 2022 11:40
@Harkishen-Singh Harkishen-Singh merged commit 4856092 into timescale:master Feb 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants