Skip to content

feat(server): Add an internal endpoint for batched metrics#2869

Merged
jan-auer merged 4 commits intomasterfrom
feat/batch-metrics-endpoint
Dec 20, 2023
Merged

feat(server): Add an internal endpoint for batched metrics#2869
jan-auer merged 4 commits intomasterfrom
feat/batch-metrics-endpoint

Conversation

@jan-auer
Copy link
Copy Markdown
Member

@jan-auer jan-auer commented Dec 19, 2023

Introduces an endpoint that allows Relays to send metrics from multiple projects and organizations in a single request. This endpoint requires Relay authentication.

The endpoint takes a JSON payload in the following format:

{
  "project_key1": [ /* buckets... */ ],
  "project_key2": [ /* buckets... */ ],
  // ...
}

Emission of such requests will be implemented in a separate PR.

* master:
  feat(processor): Add a metric to track the time of all messages (#2877)
  build(py): Update to python 3.9 (#2876)
  fix(spans): Collapse constants in SQL select (#2867)
  fix(spans): Parse quotes in MySQL (#2846)
  ref(cardinality): Use a Lua script and in-memory cache for the cardinality limiter (#2849)
  fix(spans): Detect hex with fallback scrubber (#2868)
@jan-auer jan-auer marked this pull request as ready for review December 20, 2023 11:39
@jan-auer jan-auer requested a review from a team as a code owner December 20, 2023 11:39
@jan-auer jan-auer self-assigned this Dec 20, 2023
}
}

fn handle_process_batched_metrics(&self, message: ProcessBatchedMetrics) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it worth extracting metric processing into a module? We've already done this for a few cases, see.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. @olksdr would you like to move this afterwards as part of your refactors?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jan-auer yeah, I will have a look into this, and try to refactor into the separate module.

@jan-auer jan-auer merged commit d7e4b12 into master Dec 20, 2023
@jan-auer jan-auer deleted the feat/batch-metrics-endpoint branch December 20, 2023 14:10
@jan-auer jan-auer mentioned this pull request Dec 21, 2023
6 tasks
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.

3 participants