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

chore: adds a Grafana Agent example #1958

Merged
merged 2 commits into from
May 29, 2023
Merged

chore: adds a Grafana Agent example #1958

merged 2 commits into from
May 29, 2023

Conversation

petethepig
Copy link
Member

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2023

Flamegraph.com report

pyroscope-oss.frontend.cpu.json
See in flamegraph.com
pyroscope-oss.frontend.inuse_objects.json
See in flamegraph.com
pyroscope-oss.frontend.inuse_space.json
See in flamegraph.com

Created by Flamegraph.com Github Action

@codecov-commenter
Copy link

codecov-commenter commented May 24, 2023

Codecov Report

Merging #1958 (0f55aac) into main (254c575) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1958   +/-   ##
=======================================
  Coverage   60.35%   60.35%           
=======================================
  Files         175      175           
  Lines        4957     4957           
  Branches     1146     1146           
=======================================
  Hits         2992     2992           
  Misses       1953     1953           
  Partials       12       12           

see 1 file with indirect coverage changes

@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
webapp/public/assets/app.js 998.08 KB (0%) 20 s (0%) 4.5 s (+6.69% 🔺) 24.5 s
webapp/public/assets/app.css 19.9 KB (0%) 399 ms (0%) 0 ms (+100% 🔺) 399 ms
webapp/public/assets/styles.css 9.6 KB (0%) 192 ms (0%) 0 ms (+100% 🔺) 192 ms
packages/pyroscope-flamegraph/dist/index.js 625.43 KB (0%) 12.6 s (0%) 2 s (-0.33% 🔽) 14.5 s
packages/pyroscope-flamegraph/dist/index.node.js 626.1 KB (0%) 12.6 s (0%) 752 ms (+54.65% 🔺) 13.3 s
packages/pyroscope-flamegraph/dist/index.css 8.14 KB (0%) 163 ms (0%) 0 ms (+100% 🔺) 163 ms

@@ -0,0 +1,17 @@
# Grafana Agent Pull Mode Integration

This example demonstrates how you can use Grafana Agent with Grafana Pyroscope (formerly known as Phlare).
Copy link
Member Author

Choose a reason for hiding this comment

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

phlare reference #1: this one can live imo

@@ -0,0 +1,24 @@
phlare.write "example" {
Copy link
Member Author

Choose a reason for hiding this comment

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

phlare reference #2: we asked @korniltsev today to change this to pyroscope

phlare.write "example" {
// Send metrics to a locally running Phlare instance.
endpoint {
url = "http://phlare:4100"
Copy link
Member Author

Choose a reason for hiding this comment

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

I will change this one

}


phlare.scrape "default" {
Copy link
Member Author

Choose a reason for hiding this comment

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

same as #2


phlare.scrape "default" {
targets = [
{"__address__" = "phlare:4100", "app"="phlare"},
Copy link
Member Author

Choose a reason for hiding this comment

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

I will change this one

{"__address__" = "phlare:4100", "app"="phlare"},
{"__address__" = "agent:12345", "app"="agent"},
]
forward_to = [phlare.write.example.receiver]
Copy link
Member Author

Choose a reason for hiding this comment

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

same as #2

ports:
- 3000:3000

phlare:
Copy link
Member Author

Choose a reason for hiding this comment

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

I will change this one

- 3000:3000

phlare:
image: 'grafana/phlare:latest'
Copy link
Member Author

Choose a reason for hiding this comment

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

reference #4: this will only change once we merge two projects

image: 'grafana/phlare:latest'
ports:
- 4100:4100
command: -config.file=/etc/phlare/config.yaml
Copy link
Member Author

Choose a reason for hiding this comment

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

kinda same as #4, although I can probably change earlier

- 4100:4100
command: -config.file=/etc/phlare/config.yaml
volumes:
- ./phlare/config.yaml:/etc/phlare/config.yaml
Copy link
Member Author

Choose a reason for hiding this comment

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

kinda same as #4, although I can probably change earlier

"panels": [
{
"datasource": {
"type": "phlare",
Copy link
Member Author

Choose a reason for hiding this comment

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

reference #5: this is a tricky one, there's a PR here grafana/grafana#67847

"targets": [
{
"datasource": {
"type": "phlare",
Copy link
Member Author

Choose a reason for hiding this comment

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

same as #5

- name: Pyroscope
orgId: 1
uid: pyroscope
type: 'phlare'
Copy link
Member Author

Choose a reason for hiding this comment

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

same as #5

type: 'phlare'
access: 'proxy'
grafanaOrgId: 1
url: http://phlare:4100
Copy link
Member Author

Choose a reason for hiding this comment

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

will change

@@ -0,0 +1,6 @@
---
scrape_configs:
- job_name: "phlare"
Copy link
Member Author

Choose a reason for hiding this comment

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

will change

@github-actions
Copy link
Contributor

Flamegraph.com report

pyroscope-oss.alloc_objects.json
See in flamegraph.com
pyroscope-oss.alloc_space.json
See in flamegraph.com
pyroscope-oss.cpu.json
See in flamegraph.com
pyroscope-oss.goroutines.json
See in flamegraph.com
pyroscope-oss.inuse_objects.json
See in flamegraph.com
pyroscope-oss.inuse_space.json
See in flamegraph.com

Created by Flamegraph.com Github Action

Copy link
Contributor

@Rperry2174 Rperry2174 left a comment

Choose a reason for hiding this comment

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

lgtm!

@Rperry2174 Rperry2174 merged commit d6ab3f5 into main May 29, 2023
20 checks passed
@Rperry2174 Rperry2174 deleted the grafana-agent branch May 29, 2023 21:18
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.

None yet

3 participants