Skip to content

docs: updates examples with grafana/pyroscope, enforces consistent style #2314

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

Merged
merged 37 commits into from
Aug 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
90ff2c8
deletes old grafana-integration example
petethepig Aug 25, 2023
d998ffc
deletes old rideshare-phlare example
petethepig Aug 25, 2023
1ba686f
deletes old adhoc example
petethepig Aug 25, 2023
06483bc
deletes old auth-env-var example
petethepig Aug 25, 2023
e321209
deletes old metrics-export example
petethepig Aug 25, 2023
d76ef86
updates dotnet/fast-slow
petethepig Aug 25, 2023
0609cb8
updates /dotnet/rideshare example
petethepig Aug 25, 2023
87c537f
updates /dotnet/web-new example
petethepig Aug 25, 2023
1300d30
updates /golang-push/rideshare example
petethepig Aug 25, 2023
9322cf5
updates /golang-push/simple example
petethepig Aug 25, 2023
cae61e5
updates /java/fib example
petethepig Aug 25, 2023
e84c5dc
updates /java-jfr/rideshare example
petethepig Aug 25, 2023
fef2e2d
updates /java/simple example
petethepig Aug 25, 2023
1259089
updates /nodejs/express-ts example
petethepig Aug 25, 2023
9e67ac6
updates /nodejs/express-ts example
petethepig Aug 25, 2023
71c4c9b
updates /nodejs/express example
petethepig Aug 25, 2023
2325c39
updates /php-fpm example
petethepig Aug 25, 2023
88824d0
updates /php example
petethepig Aug 25, 2023
8bc56ef
moves php examples to one directory
petethepig Aug 25, 2023
86714ba
updates /python/rideshare/django example
petethepig Aug 25, 2023
56d6eea
updates /python/rideshare/fastapi example
petethepig Aug 25, 2023
cc682b3
updates /python/rideshare/flask example
petethepig Aug 25, 2023
0b7cd4b
updates /python/simple example
petethepig Aug 25, 2023
e412ff8
updates /ruby/rideshare example
petethepig Aug 25, 2023
68b6a68
updates /ruby/rideshare_rails example
petethepig Aug 25, 2023
61d3753
updates /ruby/simple example
petethepig Aug 25, 2023
0ad21bd
updates /rust/rideshare example
petethepig Aug 25, 2023
401d599
enforces consistent style for docker compose files
petethepig Aug 25, 2023
5f82c59
updates image name in READMEs
petethepig Aug 25, 2023
58e9c63
updates /base-url example
petethepig Aug 25, 2023
56b56e3
deletes golang-pull/file example
petethepig Aug 25, 2023
6d47753
updates golang-pull/static example
petethepig Aug 25, 2023
43bc822
removes mattermost example
petethepig Aug 25, 2023
46be7da
removes consul example
petethepig Aug 25, 2023
5002578
updates /node/express-pull example
petethepig Aug 25, 2023
3f9de19
updates dotnet example README
petethepig Aug 25, 2023
a5d8114
updates kubernetes example
petethepig Aug 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions examples/adhoc/AdhocPush.java

This file was deleted.

69 changes: 0 additions & 69 deletions examples/adhoc/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions examples/adhoc/adhoc-push.py

This file was deleted.

39 changes: 0 additions & 39 deletions examples/adhoc/adhoc-push.rb

This file was deleted.

38 changes: 0 additions & 38 deletions examples/adhoc/adhoc-spy.py

This file was deleted.

61 changes: 0 additions & 61 deletions examples/adhoc/pull/adhoc-pull.go

This file was deleted.

13 changes: 0 additions & 13 deletions examples/auth-env-var/docker-compose.yml

This file was deleted.

7 changes: 0 additions & 7 deletions examples/auth-env-var/server.yml

This file was deleted.

8 changes: 4 additions & 4 deletions examples/base-url/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: '3'
services:
pyroscope:
image: 'pyroscope/pyroscope:latest'
image: grafana/pyroscope
command:
- 'server'
environment:
PYROSCOPE_BASE_URL: /pyroscope
- -api.base-url
- /pyroscope

nginx:
image: nginx
ports:
Expand Down
23 changes: 1 addition & 22 deletions examples/dotnet/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# .NET Examples

The directory contains examples of how to run Pyroscop to profile .NET applications in Docker containers.
The directory contains examples of how to run Pyroscope to profile .NET applications in Docker containers.

### Fast-slow

Expand All @@ -10,30 +10,9 @@ The code is pretty self-explanatory: `Slow.Work` should take 80% of CPU time and
`Fast.Work`. You may ask why `Fast` and `Slow` classes are defined in separate namespaces. The fact is that Pyroscope
colors frames depending on the namespaces (for .NET traces), so they are defined in this way just for sake of demo ;)

In this example, the program is built as an executable (`/dotnet/example`), therefore `-spy-name dotnetspy` argument is
required to tell Pyroscope how to deal with the process:
> CMD ["pyroscope", "exec", "-spy-name", "dotnetspy", "/dotnet/example"]

To run the example execute the following commands:

```shell
# cd examples/dotnet/fast-slow
# docker-compose up
```

### Web

The example is a simple ASP.NET Core web app that enables you to observe how consumed CPU time is changed by making
HTTP requests to [http://localhost:5000](http://localhost:5000).

In contrast to the previous example, the application is built as a dynamic library (`/dotnet/example.dll`) and
runs with dotnet. This allows Pyroscope to automatically detect which kind of spy to use, making `-spy-name` option
unnecessary:
> CMD ["pyroscope", "exec", "dotnet", "/dotnet/example.dll"]

To run the example execute the following commands:

```shell
# cd examples/dotnet/web
# docker-compose up
```
Loading