Skip to main content

New Relic SDK to interact with Nerdgraph API.

Project description

Community-Project

PyPI - Supported versions PyPI - Package version PyPI - Downloads PyPI - MIT License

Codacy Badge pipeline status

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
```

Pygments SB NRQL

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

pygments_sb_nrql-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygments_sb_nrql-0.1.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pygments_sb_nrql-0.1.0.tar.gz.

File metadata

  • Download URL: pygments_sb_nrql-0.1.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/5.15.0-122-generic

File hashes

Hashes for pygments_sb_nrql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4970795cf15355500e5acdd59cc5130a48cef02985068c38e347dbb837255d8a
MD5 7ca8b966183a43aa1459502bc34fc5cc
BLAKE2b-256 234f5bbfcf7650cc179b8d1d5eb7a0113f01c0146fdc00e46eab2a8458c31688

See more details on using hashes here.

File details

Details for the file pygments_sb_nrql-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pygments_sb_nrql-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.11.10 Linux/5.15.0-122-generic

File hashes

Hashes for pygments_sb_nrql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df5be04ebd7ea1c363aacbd558da1ff95f46f3a348ccc5bcd7ae6bf36a2e23c4
MD5 e4cda2be59aa167e621654cf4f6758a0
BLAKE2b-256 be68c697920a3abee2c0a22bd735071bc3b9e6b44cde9589fba12f44a85b9286

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page