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

UPLOAD-1582 Example metrics for uploads per data_stream #447

Merged
merged 17 commits into from
Aug 28, 2024

Conversation

whytheplatypus
Copy link
Contributor

@whytheplatypus whytheplatypus commented Aug 14, 2024

Foundation work for displaying useful metrics based on the Manifest sent with a file. In this case completed uploads per data_stream.

example promethus query: increase(files_uploaded_for_dextesting_count[1m])

metrics:

  • # of responses by method and code
  • # of uploads by datastream
  • # of active uploads (might do by datastream?)

@whytheplatypus whytheplatypus changed the title Example metrics for uploads per data_stream UPLOAD-1582 Example metrics for uploads per data_stream Aug 14, 2024
if !ok {
val, ok = resp.ChangeFileInfo.MetaData[key]
if !ok {
// no op.. should be something else
Copy link
Contributor

Choose a reason for hiding this comment

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

Assuming this would throw some kind of "invalid metadata" error.

Copy link
Contributor

@cfarmer-fearless cfarmer-fearless left a comment

Choose a reason for hiding this comment

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

Looks like a good start

@whytheplatypus
Copy link
Contributor Author

Testing example:

podman-compose up -d
# go to http://localhost:3000/d/eduxvq8up8f7kb/dex-dashboard?orgId=1&refresh=5s to see metrics, upload a file or two and watch them change

@whytheplatypus whytheplatypus marked this pull request as ready for review August 19, 2024 18:07
Copy link
Contributor

@cyber-decker cyber-decker left a comment

Choose a reason for hiding this comment

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

I was able to fire this up and launch the application just fine. Looks like upload is working as expected. I found the demo-client-node-js tool in /upload-server/example/demo-client-node-js to be really helpful here.

The metrics were getting reported correctly on the localhost:8080/metrics endpoint. It looks like and things were mostly showing up on the dashboard but I did run in to a few things that might require some changes on the dashboard:

  • Active Uploads was not correctly configured in grafana and was not showing any changes at all. No metric was set for this dashboard tile. Might want to set this to dex_server_active_uploads with time series view.
  • Uploads might be better as a time series graph. The bar graph over time gives some weird, extrapolated metrics that don't really represent well what the graph is showing.
  • HTTP Responses is working fine, but, maybe something different than the pie chart. The graph could get flooded with something like tons of patch requests for small chunks and you can't even see the rest of the graph unless you hide the patch responses. This may be better as straight numbers or maybe bars? Because the values can vary so differently, the percentage difference is too big when one thing is heavily inflated.

Other than that, the metrics seem to be getting into the system as expected, just need to tweak the display/output.

"title": "HTTP Responses",
"type": "piechart"
},
{
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be the start of the Active Uploads config. Needs an appropriate target/expression to be used for displaying the results.

}
],
"title": "Uploads",
"type": "barchart"
Copy link
Contributor

Choose a reason for hiding this comment

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

timeseries might work well here. It was easier to visualize the change in upload counts over time with that.

Copy link
Contributor

@thetif thetif left a comment

Choose a reason for hiding this comment

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

looks good to me
checked out the new metrics dashboard and it's updating correctly

can now run things like `podman-compose -f docker-compose.yml -f
docker-compose.azurite.yml up -d` to enable local azure testing
Copy link
Contributor

@cyber-decker cyber-decker left a comment

Choose a reason for hiding this comment

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

Needs one more little thing to finish here to get the docker compose configs right to point to the correct grafana/prometheus configs.

I did that locally and it's looking good. The dashboards looks great now and are reporting things nicely!

- 9090:9090
restart: unless-stopped
volumes:
- ./config/local/prometheus:/etc/prometheus
Copy link
Contributor

Choose a reason for hiding this comment

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

There's nothing in the ./config/local folders. I think the things in ./configs/local need to be moved in to there or change the target in the docker-compose configuration on this line.

This is causing prometheus/grafana to get some errors on startup and not load the dex dashboards.

- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
volumes:
- ./config/local/grafana/provisioning:/etc/grafana/provisioning
Copy link
Contributor

Choose a reason for hiding this comment

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

Same problem as above. needs to be either ./configs/local or move the stuff from ./config/local to this folder or change the target here in the docker-compose.

Dashboards won't load up with this configuration.

Copy link

sonarcloud bot commented Aug 28, 2024

Copy link
Contributor

@cyber-decker cyber-decker left a comment

Choose a reason for hiding this comment

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

Looks great!

@whytheplatypus whytheplatypus merged commit 9b261ed into main Aug 28, 2024
1 check passed
@whytheplatypus whytheplatypus deleted the foundation/metrics branch August 28, 2024 19:23
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.

4 participants