Skip to main content

Shopcloud Metric CLI

install

$ pip install shopcloud_metric

Usage

Job:

Metrics wenn ein Job ausgeführt wird

from shopcloud_metric import JobMetric

job = JobMetric('sage-supplier-update', 
    instance='airflow-production', 
    env='testing',
)
with job as j:
    j.gauge('job_last_success_unixtime', labels={'supplier': 'EP'})
    raise Exception('AS a')
    j.gauge('job_last_success_unixtime', labels={'supplier': 'SP'})

job.gauge('job_last_success_unixtime', labels={'supplier': 'SP'})
job.success()

RawMetrics:

from shopcloud_metric import MetricRegistry

registry = MetricRegistry()
registry.gauge('job_up', value=1, labels={'name': 'shopcloud-infrastructure-cli', 'instance': 'tests'})
registry.push()

registry.gauge('job_up', value=0, labels={'name': 'my-job', 'instance': 'airflow-production'})
registry.gauge('job_last_success_unixtime', labels=[{'name': 'test'}])
registry.gauge('api_http_requests_total', value=12, labels={'operation': 'create'})
registry.gauge('process_cpu_seconds_total', value=1)
registry.gauge('http_request_duration_seconds', value=1)
registry.push()

Deploy to PyPi

$ pip3 install wheel twine
$ python3 setup.py sdist bdist_wheel
$ twine upload dist/* 

Metadata

Release files for shopcloud-metric 0.2.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 shopcloud-metric 0.2.1
File Size Uploaded Provenance Actions
shopcloud_metric-0.2.1.tar.gz 3.2 kB Without provenance Details for shopcloud_metric-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for shopcloud-metric 0.2.1
File Interpreter ABI Platform Actions
shopcloud_metric-0.2.1-py3-none-any.whl Python 3 none any Details for shopcloud_metric-0.2.1-py3-none-any.whl

Total release size: 7.8 kB

Release files / shopcloud_metric-0.2.1.tar.gz

Download URL shopcloud_metric-0.2.1.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fc4be96ba34b2614ddb513cca38255a0119c70d6d6242575e2b54ed21d6f5144
BLAKE2b-256 checksum
How to use checksums
8cc4178ec812b7289fdde2e964a423ab788ead23819a0551fef07df4a7512fd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.6

Release files / shopcloud_metric-0.2.1-py3-none-any.whl

Download URL shopcloud_metric-0.2.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb6ba60abeba49206d53871ae158b6883b6711452aad2dac50c146d1896ac383
BLAKE2b-256 checksum
How to use checksums
3f67246250134487575709a72a840c6d7a0e38578216867f18ffc1a37c05937c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.6

Security for shopcloud-metric 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

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