Skip to content

Feature/influxdb metrics - #97

Open
jnation3406 wants to merge 3 commits into
devfrom
feature/influxdb_metrics
Open

Feature/influxdb metrics#97
jnation3406 wants to merge 3 commits into
devfrom
feature/influxdb_metrics

Conversation

@jnation3406

Copy link
Copy Markdown
Contributor

Adds a middleware to the end of the stack that sends completed request details to influxDB if it is configured correctly. Spawns off a Geventlet thread to actually write to the influxDB server so that problems with that connection don't impact the users response times. I've tested this locally with sending metrics to hermes_test on the influxDB server and they were received as expected.

jnation3406 and others added 3 commits June 23, 2026 05:25
Make the internal hermes endpoints require authentication to stop bot…
@jnation3406
jnation3406 requested review from cmccully and cnweaver July 28, 2026 17:15

@cnweaver cnweaver left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't know much about InfluxDB, so I don't have much frame of reference for most of this, but the idea seems sound.

I like capturing both the endpoint and authenticated user (if any) in each record. I see that the final result code for the request is also included, which will give insight into whether each request succeeded, but I wonder if there are cases where more information might be important. A case I've often wanted in the past is to be able to check which user was responsible for creating a specific object (and in which request, from what origin), or similarly given a request, which object(s) it created/affected. For example, I've wanted this for incident response, like if some user has always connected from Kansas before, but there have now been some suspicious requests from Madagascar, I'd like to be able to locate all of those requests and what they touched. For GET /objects/obj_foo that's usually obvious, but I'm not sure if it in in HERMES for cases like POST /new_object, where the object ID is assigned by the server after receiving the request. Likewise, knowing the IP address from which each request arrived (possibly including a chain of proxies) can be pretty important.

@dpetravick might have thoughts on this also.

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