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 /status/usage-stats endpoint to show usage stats data #1782

Merged
merged 6 commits into from Nov 9, 2022

Conversation

electron0zero
Copy link
Member

@electron0zero electron0zero commented Oct 4, 2022

What this PR does:
Expose usage stats data under /status/usage-stats,

Here is what response looks like when running locally

Details
{
  "clusterID": "",
  "createdAt": "0001-01-01T00:00:00Z",
  "interval": "0001-01-01T00:00:00Z",
  "intervalPeriod": 14400,
  "target": "all",
  "version": {
    "version": "fix_1569-a91d441-WIP",
    "revision": "a91d441fc",
    "branch": "fix_1569",
    "buildUser": "",
    "buildDate": "",
    "goVersion": "go1.19.3"
  },
  "os": "linux",
  "arch": "amd64",
  "edition": "oss",
  "metrics": {
    "receiver_enabled_opencensus": 1,
    "ring_kv_store": "inmemory",
    "storage_wal_search_encoding": "none",
    "memstats": {
      "heap_alloc": 6023960,
      "gc_cpu_fraction": 0.04908009099806705,
      "total_alloc": 10418752,
      "sys": 25277704,
      "heap_inuse": 7626752,
      "stack_inuse": 1015808,
      "pause_total_ns": 532719,
      "num_gc": 4,
      "alloc": 6023960
    },
    "num_goroutine": 122,
    "feature_enabled_search": 1,
    "frontend_version": "v1",
    "receiver_enabled_kafka": 0,
    "num_cpu": 8,
    "receiver_enabled_zipkin": 1,
    "storage_backend": "local",
    "storage_wal_encoding": "snappy",
    "storage_cache": "",
    "feature_enabled_auth_stats": 0,
    "feature_enabled_metrics_generator": 1,
    "feature_enabled_multitenancy": 1,
    "storage_block_encoding": "zstd",
    "storage_block_search_encoding": "snappy",
    "receiver_enabled_jaeger": 1,
    "receiver_enabled_otlp": 1,
    "ring_replication_factor": 1
  }
}

Which issue(s) this PR fixes:
Fixes #1569

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@electron0zero electron0zero changed the title Expose usage stats under /status/usage-stats feat: Add /status/usage-stats endpoint to show usage stats data Nov 7, 2022
@electron0zero electron0zero marked this pull request as ready for review November 8, 2022 10:50
Copy link
Contributor

@zalegrala zalegrala left a comment

Choose a reason for hiding this comment

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

This looks good to me. Nice work.

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Please add a line about this new endpoint to our api docs:

https://github.com/grafana/tempo/blob/main/docs/tempo/website/api_docs/_index.md

@joe-elliott joe-elliott merged commit a701e22 into grafana:main Nov 9, 2022
@electron0zero electron0zero deleted the fix_1569 branch November 10, 2022 11:27
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.

Include /status/usage-stats endpoint that would give the current usage-stats data
3 participants