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

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.4.1.tar.gz (6.4 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.4.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pygments_sb_nrql-0.4.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/5.15.0-134-generic

File hashes

Hashes for pygments_sb_nrql-0.4.1.tar.gz
Algorithm Hash digest
SHA256 c8dcad5340ef7152413883352d38921e4e80cd5ded13835bcd75989da870204f
MD5 d8c26789bec2cf2b74a542e65bbc68cc
BLAKE2b-256 a9b7504bb9e89715b3a37e964f55dca3a3e117c52fedeea549f2b1c98842a53c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pygments_sb_nrql-0.4.1-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.12 Linux/5.15.0-134-generic

File hashes

Hashes for pygments_sb_nrql-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bce9c1178dc149e201247f2e2dff0ecc8da633b016bb8882fd0049b2409c9238
MD5 3f3cd5bb86ab5d5e2c330b2c9bdf18c3
BLAKE2b-256 c3c53536d4775d8e3d884d4978f4d57dfe83593748c5b6edc392f8482d0beecf

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