Skip to main content

Bottle Elastic APM

Simple plugin to use ELK with APM server for your bottle application

Using default_app

default_app() uses AppStack, so you only need to install it once.

from bottle import default_app, run
from bottle_elastic_apm import ElasticAPM, make_apm_client

ELK_CONFIG = {
    'service_name': 'my-app',
}

app = default_app()
app2 = default_app()

apm_client = make_apm_client(**ELK_CONFIG) # avoid multi client instances
app.install(ElasticAPM(client=apm_client))

@app.get('/')
def index():
    return 'Hello world!'

@app2.get('/2')
def index2():
    return 'Hello world!'

run(app)

Using Bottle()

Bottle() don't uses AppStack, so you need to install on all of them.

from bottle import Bottle, run
from bottle_elastic_apm import ElasticAPM, make_apm_client

ELK_CONFIG = {
    'service_name': 'my-app',
}

app = Bottle()
app2 = Bottle()
app.mount('v2', app2)

apm_client = make_apm_client(**ELK_CONFIG) # avoid multi client instances
app.install(ElasticAPM(client=apm_client))
app2.install(ElasticAPM(client=apm_client))

@app.get('/')
def index():
    return 'Hello world!'

@app2.get('/2')
def index2():
    return 'Hello world!'

run(app)

Avoid capture specific errors

from bottle import default_app
from bottle_elastic_apm import ElasticAPM, make_apm_client

ELK_CONFIG = {
    'service_name': 'my-app',
}

app = default_app()
apm_client = make_apm_client(**ELK_CONFIG) # avoid multi client instances
app.install(ElasticAPM(client=apm_client, avoided_errors={(401, 'JWT: Signature has expired',)}))

Metadata

Release files for bottle-elastic-apm 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bottle-elastic-apm 0.1.1
File Size Uploaded Provenance Actions
bottle-elastic-apm-0.1.1.tar.gz 4.2 kB Without provenance Details for bottle-elastic-apm-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bottle-elastic-apm 0.1.1
File Interpreter ABI Platform Actions
bottle_elastic_apm-0.1.1-py3-none-any.whl Python 3 none any Details for bottle_elastic_apm-0.1.1-py3-none-any.whl

Total release size: 9.1 kB

Release files / bottle-elastic-apm-0.1.1.tar.gz

Download URL bottle-elastic-apm-0.1.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
05de5edfdd4ed789ee67392ee256b7781cdbd4d93a15d2f4eb6ec8492d693c74
BLAKE2b-256 checksum
How to use checksums
5ffcdf435ba830b1c135f57123e4ec8f3e13b03b5dd8569e50bf7bc8b653f1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6

Release files / bottle_elastic_apm-0.1.1-py3-none-any.whl

Download URL bottle_elastic_apm-0.1.1-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c52e04237bb3b682ec69be312802f4d8c5a3be56f59a74b8f69b97d9615b0339
BLAKE2b-256 checksum
How to use checksums
7c7a6fb8256c42d6d3f85008345fcc9eb616a5568818305fac81e4605c2423d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6

Security for bottle-elastic-apm 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page