- Notifications
You must be signed in to change notification settings - Fork 761
docs: updated the "Read The Docs" documentation #4728
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
Changes from 8 commits
Commits
Show all changes
10 commits Select commit Hold shift + click to select a range
9a9d3ab docs: updated the ReadTheDocs documentation to all have links to the …
jscancella f4e4fca Update docs/examples/metrics/prometheus-grafana/README.rst
jscancella 42686d2 Added changelog entry as requested in PR feedback
jscancella 8ca5f6d fixed link to localhost to see the metrics
jscancella e9b0aa8 just use a plain http link
jscancella f3fbd1e Update CHANGELOG.md
jscancella 67601f5 fix tox reported issues
jscancella 93bff97 fix capitalization of Prometheus
jscancella 7e68525 Update CHANGELOG.md
xrmx 0d03e4c Merge branch 'main' into main
xrmx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| Prometheus Instrumentation | ||
| ========================== | ||
| | ||
| This shows how to use ``opentelemetry-exporter-prometheus`` to automatically generate Prometheus metrics. | ||
| | ||
| The source files of these examples are available :scm_web:`here <docs/examples/prometheus-grafana/>`. | ||
| | ||
| Preparation | ||
| ----------- | ||
| | ||
| This example will be executed in a separate virtual environment: | ||
| | ||
| .. code-block:: | ||
| | ||
| $ mkdir prometheus_auto_instrumentation | ||
| $ virtualenv prometheus_auto_instrumentation | ||
| $ source prometheus_auto_instrumentation/bin/activate | ||
| | ||
| | ||
| Installation | ||
| ------------ | ||
| | ||
| .. code-block:: | ||
| | ||
| $ pip install -r requirements.txt | ||
| | ||
| | ||
| Execution | ||
| --------- | ||
| | ||
| .. code-block:: | ||
| | ||
| $ python ./prometheus-monitor.py | ||
| $ Server is running at http://localhost:8000 | ||
| | ||
| Now you can visit http://localhost:8000/metrics to see Prometheus metrics. | ||
| You should see something like: | ||
| | ||
| .. code-block:: | ||
| | ||
| # HELP python_gc_objects_collected_total Objects collected during gc | ||
| # TYPE python_gc_objects_collected_total counter | ||
| python_gc_objects_collected_total{generation="0"} 320.0 | ||
| python_gc_objects_collected_total{generation="1"} 58.0 | ||
| python_gc_objects_collected_total{generation="2"} 0.0 | ||
| # HELP python_gc_objects_uncollectable_total Uncollectable objects found during GC | ||
| # TYPE python_gc_objects_uncollectable_total counter | ||
| python_gc_objects_uncollectable_total{generation="0"} 0.0 | ||
| python_gc_objects_uncollectable_total{generation="1"} 0.0 | ||
| python_gc_objects_uncollectable_total{generation="2"} 0.0 | ||
| # HELP python_gc_collections_total Number of times this generation was collected | ||
| # TYPE python_gc_collections_total counter | ||
| python_gc_collections_total{generation="0"} 61.0 | ||
| python_gc_collections_total{generation="1"} 5.0 | ||
| python_gc_collections_total{generation="2"} 0.0 | ||
| # HELP python_info Python platform information | ||
| # TYPE python_info gauge | ||
| python_info{implementation="CPython",major="3",minor="8",patchlevel="5",version="3.8.5"} 1.0 | ||
| # HELP MyAppPrefix_my_counter_total | ||
| # TYPE MyAppPrefix_my_counter_total counter | ||
| MyAppPrefix_my_counter_total 964.0 | ||
| | ||
| ``MyAppPrefix_my_counter_total`` is the custom counter created in the application with the custom prefix ``MyAppPrefix``. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.