New Relic SDK to interact with Nerdgraph API.
Project description
Pygments SB NRQL
New Relic Query Language (NRQL) lexer for Pygments built by Dynova.
NRQL is a SQL-like query language you can use to query your data in New Relic. This is a Python package that provides a lexer for Pygments to highlight NRQL queries.
Requirements
- Python 3.9.0 or higher
Install
Install from PyPI
pip install pygments-sb-nrql
Usage
Just install and create markdown blocks with the language nrql to get a
highlighted code block.
```nrql
-- Example NRQL query
FROM
Log
WITH
numeric(http.statusCode) AS `sb.statusCode`,
numeric(timespan) * 1000 AS `sb.duration`,
capture(pageUrl, r'https://(?P[^/]+)/.+') AS `sb.domain`
SELECT
average(`sb.duration`) AS 'Avg. Duration (s)'
WHERE
entity.name = 'Sample Application' AND
`sb.duration` > 0
FACET
CASES(
`sb.statusCode` < 400 AS 'Success',
`sb.statusCode` < 500 AS 'Client Error',
`sb.statusCode` < 600 AS 'Server Error'
) AS 'Status',
`sb.domain` AS 'Domain'
TIMESERIES
3 hours
SINCE
'2024-10-01 00:00:00'
UNTIL
'2024-11-01 00:00:00'
WITH TIMEZONE
'America/LIMA'
COMPARE WITH
1 month ago
```
Docs
Changelog
All changes to versions of this library are listed in the change history.
Development
Check out our contribution guide.
Contributors
See the list of contributors here.
License
This project is licensed under the terms of the MIT license. See the LICENSE file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygments_sb_nrql-0.5.0.tar.gz.
File metadata
- Download URL: pygments_sb_nrql-0.5.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.11.13 Linux/5.15.0-134-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd23fb5484c87b6d514b41b062b17b95cb5cadd1fb044975557e4ef8fa524221
|
|
| MD5 |
39254c2ce94c32afabf0cb6b37842f29
|
|
| BLAKE2b-256 |
90678200a1cc13a74c6926f8df651a67ccd90fce394c43e49d09f8ce9005fe6d
|
File details
Details for the file pygments_sb_nrql-0.5.0-py3-none-any.whl.
File metadata
- Download URL: pygments_sb_nrql-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.11.13 Linux/5.15.0-134-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63a25b8bc8150d28d7b1e4c1c4ca7592edee97747555e97f54224c0c2ceb6a59
|
|
| MD5 |
b2b977c455be6df5b88a0caf555cf77f
|
|
| BLAKE2b-256 |
ee3a853cd4e2beff4d0a9134d35d70b2e875733886ade164a658366a3c874c5f
|