From e73c1c008a3249013523601615f9c42694f6476b Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Sun, 21 May 2023 22:51:47 +0800 Subject: [PATCH 01/17] wip --- uptrace/README.md | 49 +++++ uptrace/__pycache__/app.cpython-310.pyc | Bin 0 -> 1467 bytes uptrace/app.py | 50 +++++ uptrace/docker-compose.yaml | 97 +++++++++ uptrace/otel-collector.yaml | 116 +++++++++++ uptrace/trace.json | 20 ++ uptrace/uptrace.yml | 263 ++++++++++++++++++++++++ uptrace/vector.toml | 36 ++++ 8 files changed, 631 insertions(+) create mode 100644 uptrace/README.md create mode 100644 uptrace/__pycache__/app.cpython-310.pyc create mode 100644 uptrace/app.py create mode 100644 uptrace/docker-compose.yaml create mode 100644 uptrace/otel-collector.yaml create mode 100644 uptrace/trace.json create mode 100644 uptrace/uptrace.yml create mode 100644 uptrace/vector.toml diff --git a/uptrace/README.md b/uptrace/README.md new file mode 100644 index 0000000..4214fc2 --- /dev/null +++ b/uptrace/README.md @@ -0,0 +1,49 @@ +# Uptrace Docker demo + +## Getting started + +This example demonstrates how to quickly start Uptrace using Docker. To run Uptrace permanently, you +can also use a DEB/RPM [package](https://uptrace.dev/get/install.html#packages) or a pre-compiled +[binary](https://uptrace.dev/get/install.html#binaries). + +**Step 1**. Download the example using Git: + +```shell +git clone https://github.com/uptrace/uptrace.git +cd uptrace/example/docker +``` + +**Step 2**. Start the services using Docker: + +```shell +docker-compose pull +docker-compose up -d +``` + +**Step 3**. Make sure Uptrace is running: + +```shell +docker-compose logs uptrace +``` + +**Step 4**. Open Uptrace UI at [http://localhost:14318](http://localhost:14318) + +Uptrace will monitor itself using [uptrace-go](https://github.com/uptrace/uptrace-go) OpenTelemetry +distro. To get some test data, just reload the UI few times. It usually takes about 30 seconds for +the data to appear. + +To configure OpenTelemetry for your programming language, see +[documentation](https://uptrace.dev/get/get-started.html). + +## Alerting + +This example uses MailHog to test email notifications. Open +[http://localhost:8025](http://localhost:8025) to view available email notifications. + +See [Alerting and Notifications](https://uptrace.dev/get/alerting.html) for more details. + +## OpenTelemetry Collector + +This example also comes with a pre-configured OpenTelemetry Collector to monitor +[host metrics](https://uptrace.dev/opentelemetry/collector-host-metrics.html) and +[PostgreSQL](https://uptrace.dev/opentelemetry/postgresql-monitoring.html). diff --git a/uptrace/__pycache__/app.cpython-310.pyc b/uptrace/__pycache__/app.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a522e66eda90dc47a6e5e39edeb9c30c5a61066d GIT binary patch literal 1467 zcmZ`(O>f&q5am*oMAH(jugG7qCkNr!$_EhvA zgo)-g<7*H?AVRTp&8`?d<=4{M^0{7qPa)hh?Nk6`m= z3m#c-@8&UVTI9h;=-YkkY+Kv*>nEZkx??7K*RFUV`hQUTCxV?iJInvj91nLY zW%YX*n>S@$!!HvsMY%YdXbo8r#d*HN%6bZgPDTb{=jiOm;}>>&@O!Rw0UE7Mw17U= z>eobA!^Sb_M2TcHB_-MUH0A_iBDiJa^x)*>^ZkS9@Y@#$rGElOP4oybSKHR|JTrx! zq*#NZ1FD6Ntv5U)Fh9yIJKx2{XndN-8J<4^W0Wqt`zkX^0$Fd%ybQ7=Q=h$}PBCK; z7ueI!lLE|TcU%m!td0 znJ;g&Dqenx0Cv*?;i*j*HfzfXiH=x8WE}pAb@Uio0=_I2Tb|_`lJ~ZXf6ly{G-VesYW;~r)iQ!XHT zs%GAag@_DFnY=Swmr_hCo5%Q3l*K7TQCUHO@NnKNeaK~1E0ntx$6Q!bv`pptyQvZr z345edvxkfC_{?WLw^3;@`n709++wchG5?)g^O^T9tOP8mxXeQwAoh_Fx*_`y literal 0 HcmV?d00001 diff --git a/uptrace/app.py b/uptrace/app.py new file mode 100644 index 0000000..734f067 --- /dev/null +++ b/uptrace/app.py @@ -0,0 +1,50 @@ +import os +import sentry_sdk +import sentry_sdk.integrations.flask + +from flask import Flask, request, current_app + + +from opentelemetry import metrics +from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter +from opentelemetry.sdk.metrics import MeterProvider +from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader +from opentelemetry.sdk.resources import SERVICE_NAME, Resource +from opentelemetry.instrumentation.flask import FlaskInstrumentor + + +from opentelemetry import trace +from opentelemetry.sdk.trace import TracerProvider +from opentelemetry.sdk.trace.export import BatchSpanProcessor, ConsoleSpanExporter + + +# Service name is required for most backends +resource = Resource(attributes={ + SERVICE_NAME: "nino-flask" +}) + + +# Matrix +reader = PeriodicExportingMetricReader( + OTLPMetricExporter(endpoint="http://otelcol:4317") +) +meter_provider = MeterProvider(resource=resource, metric_readers=[reader]) +metrics.set_meter_provider(meter_provider) + +# Trace +trace_provider = TracerProvider(resource=resource) +processor = BatchSpanProcessor( + ConsoleSpanExporter() +) +trace_provider.add_span_processor(processor) +trace.set_tracer_provider(trace_provider) + + +app = Flask(__name__) +FlaskInstrumentor().instrument_app(app) + +@app.route("/", methods={'POST'}) +def hello_world(): + return "

Hello, World!

" + + diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml new file mode 100644 index 0000000..06cfa3e --- /dev/null +++ b/uptrace/docker-compose.yaml @@ -0,0 +1,97 @@ +version: '3' + +services: + web: + image: a901002666/opentelemetry:ubutu-python3.10 + command : > + opentelemetry-instrument + --traces_exporter console + --metrics_exporter console,otlp + --logs_exporter console + --service_name nino-flask + --exporter_otlp_endpoint http://otelcol:4317 + flask run --host 0.0.0.0 -p 8001 --reload + environment: + GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt + volumes: + - .:/usr/src/app + ports: + - 8001:8001 + + + clickhouse: + image: clickhouse/clickhouse-server:22.10 + restart: on-failure + environment: + CLICKHOUSE_DB: uptrace + healthcheck: + test: ['CMD', 'wget', '--spider', '-q', 'localhost:8123/ping'] + interval: 1s + timeout: 1s + retries: 30 + volumes: + - ch_data7:/var/lib/clickhouse + ports: + - '8123:8123' + - '9000:9000' + + postgres: + image: postgres:15-alpine + restart: on-failure + environment: + PGDATA: /var/lib/postgresql/data/pgdata + POSTGRES_USER: uptrace + POSTGRES_PASSWORD: uptrace + POSTGRES_DB: uptrace + # healthcheck: + # test: ['CMD-SHELL', 'pg_isready', '-U', 'uptrace'] + # interval: 1s + # timeout: 1s + # retries: 30 + volumes: + - 'pg_data4:/var/lib/postgresql/data/pgdata' + ports: + - '5432:5432' + + uptrace: + image: 'uptrace/uptrace:1.4.5' + #image: 'uptrace/uptrace-dev:latest' + restart: on-failure + volumes: + - ./uptrace.yml:/etc/uptrace/uptrace.yml + environment: + - DEBUG=2 + ports: + - '14317:14317' + - '14318:14318' + + otelcol: + image: otel/opentelemetry-collector-contrib:0.77.0 + restart: on-failure + user: '0:0' # required for logs + environment: + OTEL_EXPORTER_OTLP_ENDPOINT: uptrace:14317 + + volumes: + - ./otel-collector.yaml:/etc/otelcol-contrib/config.yaml + - /var/lib/docker/containers:/var/lib/docker/containers:ro + - /var/log:/var/log:ro + ports: + - 4317:4317 + - 4318:4318 + - 8888:8888 + + # mailhog: + # image: mailhog/mailhog:v1.0.1 + # restart: on-failure + # ports: + # - '8025:8025' + + # vector: + # image: timberio/vector:0.28.X-alpine + # volumes: + # - ./vector.toml:/etc/vector/vector.toml:ro + +volumes: + ch_data7: + pg_data4: diff --git a/uptrace/otel-collector.yaml b/uptrace/otel-collector.yaml new file mode 100644 index 0000000..a9b29b3 --- /dev/null +++ b/uptrace/otel-collector.yaml @@ -0,0 +1,116 @@ +extensions: + health_check: + pprof: + endpoint: 0.0.0.0:1777 + zpages: + endpoint: 0.0.0.0:55679 + +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + cors: + allowed_origins: + - http://* + - https://* + # hostmetrics: + # collection_interval: 10s + # scrapers: + # cpu: + # disk: + # load: + # filesystem: + # memory: + # network: + # paging: + jaeger: + protocols: + grpc: + postgresql: + endpoint: postgres:5432 + transport: tcp + username: uptrace + password: uptrace + databases: + - uptrace + tls: + insecure: true + prometheus/otelcol: + config: + scrape_configs: + - job_name: 'otelcol' + scrape_interval: 10s + static_configs: + - targets: ['0.0.0.0:8888'] + +processors: + resourcedetection: + detectors: ['system'] + batch: + send_batch_size: 10000 + timeout: 10s + +exporters: + logging: + loglevel: debug + # verbosity: detailed + otlphttp/uptrace: + endpoint: http://uptrace:14318 + tls: + insecure: true + headers: + uptrace-dsn: 'http://project2_secret_token@uptrace:14318/2' + otlp/uptrace: + endpoint: http://uptrace:14317 + tls: + insecure: true + headers: + uptrace-dsn: 'http://project2_secret_token@uptrace:14317/2' + + +service: + telemetry: + logs: + level: "debug" + pipelines: + traces: + receivers: [otlp] + processors: [batch] + exporters: [otlp/uptrace, logging] + metrics: + receivers: [otlp] + # processors: [cumulativetodelta, batch, resourcedetection] + exporters: [otlp/uptrace, logging] + logs: + receivers: [otlp] + processors: [batch] + exporters: [otlp/uptrace, logging] + +# service: +# telemetry: +# metrics: +# address: ':8888' +# # logs: +# # level: DEBUG +# pipelines: +# traces: +# receivers: [otlp, jaeger] +# # processors: [batch] +# exporters: [otlphttp/uptrace, logging] +# metrics: +# receivers: [otlp] +# # processors: [batch] +# exporters: [otlphttp/uptrace] +# # metrics/hostmetrics: +# # receivers: [hostmetrics, postgresql, prometheus/otelcol] +# # processors: [batch, resourcedetection] +# # exporters: [otlp/uptrace] +# logs: +# receivers: [otlp] +# # processors: [batch] +# exporters: [otlphttp/uptrace] + +# extensions: [health_check, pprof, zpages] diff --git a/uptrace/trace.json b/uptrace/trace.json new file mode 100644 index 0000000..e5811b5 --- /dev/null +++ b/uptrace/trace.json @@ -0,0 +1,20 @@ +[ + { + "traceId": "5982fe77008310cc80f1da5e10147519", + "parentId": "90394f6bcffb5d13", + "id": "67fae42571535f60", + "kind": "SERVER", + "name": "/m/n/2.6.1", + "timestamp": 1516781775726000, + "duration": 26000, + "localEndpoint": { + "serviceName": "api" + }, + "remoteEndpoint": { + "serviceName": "apip" + }, + "tags": { + "data.http_response_code": "201" + } + } + ] diff --git a/uptrace/uptrace.yml b/uptrace/uptrace.yml new file mode 100644 index 0000000..665e5d5 --- /dev/null +++ b/uptrace/uptrace.yml @@ -0,0 +1,263 @@ +## +## Uptrace configuration file. +## See https://uptrace.dev/get/config.html for details. +## +## You can use environment variables anywhere in this file, for example: +## +## foo: $FOO +## bar: ${BAR} +## baz: ${BAZ:default} +## +## To escape `$`, use `$$`, for example: +## +## foo: $$FOO_BAR +## + +## +## ClickHouse database credentials. +## +ch: + addr: clickhouse:9000 + user: default + password: + database: uptrace + + # TLS configuration. Uncomment to enable. + # tls: + # insecure_skip_verify: true + + # Maximum query execution time. + max_execution_time: 30s + +## +## PostgreSQL db that is used to store metadata such us metric names, dashboards, alerts, +## and so on. +## +pg: + addr: postgres:5432 + user: uptrace + password: uptrace + database: uptrace + + # TLS configuration. Uncomment to enable. + # tls: + # insecure_skip_verify: true # only for self-signed certificates + +## +## A list of pre-configured projects. Each project is fully isolated. +## +projects: + # Conventionally, the first project is used to monitor Uptrace itself. + - id: 1 + name: Uptrace + # Token grants write access to the project. Keep a secret. + token: project1_secret_token + pinned_attrs: + - service + - host.name + - deployment.environment + # Group spans by deployment.environment attribute. + group_by_env: false + # Group funcs spans by service.name attribute. + group_funcs_by_service: false + + # Other projects can be used to monitor your applications. + # To monitor micro-services or multiple related services, use a single project. + - id: 2 + name: My project + token: project2_secret_token + pinned_attrs: + - service + - host.name + - deployment.environment + # Group spans by deployment.environment attribute. + group_by_env: false + # Group funcs spans by service.name attribute. + group_funcs_by_service: false + +## +## Create metrics from spans and events. +## +metrics_from_spans: + - name: uptrace.tracing.spans + description: Spans duration (excluding events) + instrument: histogram + unit: microseconds + value: span.duration / 1000 + attrs: + - span.system + - span.group_id + - service.name + - host.name + - span.status_code + annotations: + - span.name + where: not span.is_event + + - name: uptrace.tracing.events + description: Events count (excluding spans) + instrument: counter + unit: 1 + value: span.count + attrs: + - span.system + - span.group_id + - service.name + - host.name + annotations: + - span.event_name + where: span.is_event + +## +## To require authentication, uncomment one of the following sections. +## +auth: + users: + - name: Anonymous + email: uptrace@localhost + password: uptrace + notify_by_email: true + + # Cloudflare Zero Trust Access (Identity) + # See https://developers.cloudflare.com/cloudflare-one/identity/ for more info. + # cloudflare: + # # The base URL of the Cloudflare Zero Trust team. + # - team_url: https://myteam.cloudflareaccess.com + # # The Application Audience (AUD) Tag for this application. + # # You can retrieve this from the Cloudflare Zero Trust 'Access' Dashboard. + # audience: bea6df23b944e4a0cd178609ba1bb64dc98dfe1f66ae7b918e563f6cf28b37e0 + + # OpenID Connect (Single Sign-On) + oidc: + # # The ID is used in API endpoints, for example, in redirect URL + # # `http:///api/v1/sso//callback`. + # - id: keycloak + # # Display name for the button in the login form. + # # Default to 'OpenID Connect' + # display_name: Keycloak + # # The base URL for the OIDC provider. + # issuer_url: http://localhost:8080/realms/uptrace + # # The OAuth 2.0 Client ID + # client_id: uptrace + # # The OAuth 2.0 Client Secret + # client_secret: ogbhd8Q0X0e5AZFGSG3m9oirPvnetqkA + # # Additional OAuth 2.0 scopes to request from the OIDC provider. + # # Defaults to 'profile'. 'openid' is requested by default and need not be specified. + # scopes: + # - profile + +## +## Various options to tweak ClickHouse schema. +## For changes to take effect, you need reset the ClickHouse database with `ch reset`. +## +ch_schema: + # Compression codec, for example, LZ4, ZSTD(3), or Default. + compression: ZSTD(3) + + # Whether to use ReplicatedMergeTree instead of MergeTree. + replicated: false + + # Cluster name for Distributed tables and ON CLUSTER clause. + #cluster: uptrace1 + + spans: + # Delete spans data after 30 days. + ttl_delete: 30 DAY + storage_policy: 'default' + + metrics: + # Delete metrics data after 90 days. + ttl_delete: 90 DAY + storage_policy: 'default' + +## +## Addresses on which Uptrace receives gRPC and HTTP requests. +## +listen: + # OTLP/gRPC API. + grpc: + addr: ':14317' + # tls: + # cert_file: config/tls/uptrace.crt + # key_file: config/tls/uptrace.key + + # OTLP/HTTP API and Uptrace API with UI. + http: + addr: ':14318' + # tls: + # cert_file: config/tls/uptrace.crt + # key_file: config/tls/uptrace.key + +## +## Various options for Uptrace UI. +## +site: + # Overrides public URL for Vue-powered UI in case you put Uptrace behind a proxy. + #addr: 'https://uptrace.mydomain.com' + # The base path for the Vue-powered UI in case you serve Uptrace UI behind a sub path. + path: '/' + +## +## Spans processing options. +## +spans: + # The size of the Go chan used to buffer incoming spans. + # If the buffer is full, Uptrace starts to drop spans. + #buffer_size: 100000 + + # The number of spans to insert in a single query. + #batch_size: 10000 + +## +## Metrics processing options. +## +metrics: + # List of attributes to drop for being noisy. + drop_attrs: + - telemetry.sdk.language + - telemetry.sdk.name + - telemetry.sdk.version + + # The size of the Go chan used to buffer incoming measures. + # If the buffer is full, Uptrace starts to drop measures. + #buffer_size: 100000 + + # The number of measures to insert in a single query. + #batch_size: 10000 + +## +## uptrace-go client configuration. +## Uptrace sends internal telemetry here. Defaults to listen.grpc.addr. +## +uptrace_go: + # dsn: http://project1_secret_token@localhost:14317/1 + # tls: + # cert_file: config/tls/uptrace.crt + # key_file: config/tls/uptrace.key + # insecure_skip_verify: true + +## +## SMTP settings to send emails. +## https://uptrace.dev/get/alerting.html +## +smtp_mailer: + enabled: true + host: mailhog + port: 1025 + username: mailhog + password: mailhog + from: 'uptrace@localhost' + +## +## Logging configuration. +## +logs: + # Zap minimal logging level. + # Valid values: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL. + level: INFO + +# Secret key that is used to sign JWT tokens etc. +secret_key: 102c1a557c314fc28198acd017960843 + +# Enable to log HTTP requests and database queries. +debug: false diff --git a/uptrace/vector.toml b/uptrace/vector.toml new file mode 100644 index 0000000..b8a1b9e --- /dev/null +++ b/uptrace/vector.toml @@ -0,0 +1,36 @@ +[sources.syslog_logs] +type = "demo_logs" +format = "syslog" + +[sources.apache_common_logs] +type = "demo_logs" +format = "apache_common" + +[sources.apache_error_logs] +type = "demo_logs" +format = "apache_error" + +[sources.json_logs] +type = "demo_logs" +format = "json" + +# Parse Syslog logs +# See the Vector Remap Language reference for more info: https://vrl.dev +[transforms.parse_logs] +type = "remap" +inputs = ["syslog_logs"] +source = ''' +. = parse_syslog!(string!(.message)) +''' + +# Export data to Uptrace. +[sinks.uptrace] +type = "http" +method = "post" +inputs = ["parse_logs", "apache_common_logs", "apache_error_logs", "json_logs"] +encoding.codec = "json" +framing.method = "newline_delimited" +compression = "gzip" +uri = "http://uptrace:14318/api/v1/vector/logs" +#uri = "https://api.uptrace.dev/api/v1/vector/logs" +request.headers.uptrace-dsn = "http://project1_secret_token@localhost:14317/1" From 8aa86a46b2a122b214ece79f8ee1c1f8bdc372d1 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Sun, 21 May 2023 22:53:26 +0800 Subject: [PATCH 02/17] WIP --- uptrace/pyproject.toml | 21 +++++++++++++++++ uptrace/ubuntu-dockerfile | 49 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 uptrace/pyproject.toml create mode 100644 uptrace/ubuntu-dockerfile diff --git a/uptrace/pyproject.toml b/uptrace/pyproject.toml new file mode 100644 index 0000000..4a37ef3 --- /dev/null +++ b/uptrace/pyproject.toml @@ -0,0 +1,21 @@ +[tool.poetry] +name = "flask-example" +version = "0.1.0" +description = "" +authors = ["Robert-Rino "] +readme = "README.md" + +[tool.poetry.dependencies] +python = "^3.10" +sentry-sdk = {extras = ["flask"], version = "1.22.2"} +flask = "2.2.3" +requests = "^2.23.0" +opentelemetry-distro = "^0.38b0" +opentelemetry-instrumentation-flask = "^0.38b0" +opentelemetry-exporter-otlp-proto-http = "^1.17.0" +opentelemetry-exporter-otlp-proto-grpc = "^1.17.0" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/uptrace/ubuntu-dockerfile b/uptrace/ubuntu-dockerfile new file mode 100644 index 0000000..db780a5 --- /dev/null +++ b/uptrace/ubuntu-dockerfile @@ -0,0 +1,49 @@ +ARG base=python:3.10.11-bullseye + + +FROM ${base} AS poetry +ARG POETRY_VERSION=1.4.0 + +ENV POETRY_VERSION=${POETRY_VERSION} + +RUN apt-get update && \ + apt-get -y install build-essential \ + curl && \ + curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py | python + + +### + +FROM ${base} AS builder +WORKDIR /usr/src/app + +ENV PATH=/root/.local/bin:$PATH +ENV POETRY_VIRTUALENVS_CREATE=false +ENV PIP_DISABLE_PIP_VERSION_CHECK=on + +COPY --from=poetry /root/.local /root/.local + +COPY pyproject.toml . +COPY poetry.lock . + + +RUN apt-get update && \ + apt-get -y install build-essential && \ + poetry install -vv -n --only=main --no-root + +### + +FROM ${base} + +WORKDIR /usr/src/app + +ENV PYTHONUNBUFFERED=1 +ENV PATH=/root/.local/bin:$PATH + +EXPOSE 8000/tcp +CMD ["flask", "run", "--host", "0.0.0.0"] + + +COPY --from=poetry /root/.local /root/.local +COPY --from=builder /usr/local /usr/local +COPY . /usr/src/app From 7d3eb1be9d7ff4f44e6fc38b1d9d8facb5bcde60 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Sun, 21 May 2023 23:18:37 +0800 Subject: [PATCH 03/17] WIP --- uptrace/.gitignore | 1 + uptrace/app.py | 2 +- uptrace/docker-compose.yaml | 4 ++-- uptrace/otel-collector.yaml | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 uptrace/.gitignore diff --git a/uptrace/.gitignore b/uptrace/.gitignore new file mode 100644 index 0000000..bee8a64 --- /dev/null +++ b/uptrace/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/uptrace/app.py b/uptrace/app.py index 734f067..a5c71d6 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -43,7 +43,7 @@ app = Flask(__name__) FlaskInstrumentor().instrument_app(app) -@app.route("/", methods={'POST'}) +@app.route("/") def hello_world(): return "

Hello, World!

" diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 06cfa3e..42f6aa6 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -59,8 +59,8 @@ services: restart: on-failure volumes: - ./uptrace.yml:/etc/uptrace/uptrace.yml - environment: - - DEBUG=2 + # environment: + # - DEBUG=2 ports: - '14317:14317' - '14318:14318' diff --git a/uptrace/otel-collector.yaml b/uptrace/otel-collector.yaml index a9b29b3..99a7585 100644 --- a/uptrace/otel-collector.yaml +++ b/uptrace/otel-collector.yaml @@ -78,7 +78,7 @@ service: pipelines: traces: receivers: [otlp] - processors: [batch] + # processors: [batch] exporters: [otlp/uptrace, logging] metrics: receivers: [otlp] @@ -86,7 +86,7 @@ service: exporters: [otlp/uptrace, logging] logs: receivers: [otlp] - processors: [batch] + # processors: [batch] exporters: [otlp/uptrace, logging] # service: From 7f52d8391b0e6c3d53b0c27eeceaba42f20d9777 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Mon, 22 May 2023 21:53:16 +0800 Subject: [PATCH 04/17] rm __pycache__ --- uptrace/__pycache__/app.cpython-310.pyc | Bin 1467 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 uptrace/__pycache__/app.cpython-310.pyc diff --git a/uptrace/__pycache__/app.cpython-310.pyc b/uptrace/__pycache__/app.cpython-310.pyc deleted file mode 100644 index a522e66eda90dc47a6e5e39edeb9c30c5a61066d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1467 zcmZ`(O>f&q5am*oMAH(jugG7qCkNr!$_EhvA zgo)-g<7*H?AVRTp&8`?d<=4{M^0{7qPa)hh?Nk6`m= z3m#c-@8&UVTI9h;=-YkkY+Kv*>nEZkx??7K*RFUV`hQUTCxV?iJInvj91nLY zW%YX*n>S@$!!HvsMY%YdXbo8r#d*HN%6bZgPDTb{=jiOm;}>>&@O!Rw0UE7Mw17U= z>eobA!^Sb_M2TcHB_-MUH0A_iBDiJa^x)*>^ZkS9@Y@#$rGElOP4oybSKHR|JTrx! zq*#NZ1FD6Ntv5U)Fh9yIJKx2{XndN-8J<4^W0Wqt`zkX^0$Fd%ybQ7=Q=h$}PBCK; z7ueI!lLE|TcU%m!td0 znJ;g&Dqenx0Cv*?;i*j*HfzfXiH=x8WE}pAb@Uio0=_I2Tb|_`lJ~ZXf6ly{G-VesYW;~r)iQ!XHT zs%GAag@_DFnY=Swmr_hCo5%Q3l*K7TQCUHO@NnKNeaK~1E0ntx$6Q!bv`pptyQvZr z345edvxkfC_{?WLw^3;@`n709++wchG5?)g^O^T9tOP8mxXeQwAoh_Fx*_`y From e0c11abdf266c08d5475e800fb09d09c89187b9d Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Mon, 22 May 2023 21:54:17 +0800 Subject: [PATCH 05/17] WIP --- uptrace/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uptrace/.gitignore b/uptrace/.gitignore index bee8a64..96403d3 100644 --- a/uptrace/.gitignore +++ b/uptrace/.gitignore @@ -1 +1 @@ -__pycache__ +__pycache__/* From 4fac6a1c20a177e8d68173aba14992372568aa5b Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Sun, 28 May 2023 23:24:34 +0800 Subject: [PATCH 06/17] WIP --- uptrace/Dockerfile | 56 ++++++++++++ uptrace/app.py | 174 +++++++++++++++++++++++++++++------- uptrace/docker-compose.yaml | 12 ++- uptrace/otel-collector.yaml | 168 +++++++++++++++++++++------------- 4 files changed, 314 insertions(+), 96 deletions(-) create mode 100644 uptrace/Dockerfile diff --git a/uptrace/Dockerfile b/uptrace/Dockerfile new file mode 100644 index 0000000..c8696aa --- /dev/null +++ b/uptrace/Dockerfile @@ -0,0 +1,56 @@ +ARG base=python:3.10.11-bullseye + + +# FROM ${base} AS poetry +# ARG POETRY_VERSION=1.4.0 + +# ENV POETRY_VERSION=${POETRY_VERSION} + +# RUN apt-get update && \ +# apt-get -y install build-essential \ +# curl && \ +# curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py | python + + +# ### + +# FROM ${base} AS builder +# WORKDIR /usr/src/app + +# ENV PATH=/root/.local/bin:$PATH +# ENV POETRY_VIRTUALENVS_CREATE=false +# ENV PIP_DISABLE_PIP_VERSION_CHECK=on + +# COPY --from=poetry /root/.local /root/.local + +# COPY pyproject.toml . +# COPY poetry.lock . + + +# RUN apt-get update && \ +# apt-get -y install build-essential && \ +# poetry install -vv -n --only=main --no-root + +### + +FROM ${base} + +WORKDIR /usr/src/app + +ENV PYTHONUNBUFFERED=1 +ENV PATH=/root/.local/bin:$PATH + +EXPOSE 8000/tcp +CMD ["flask", "run", "--host", "0.0.0.0"] + + +# COPY --from=poetry /root/.local /root/.local +# COPY --from=builder /usr/local /usr/local +RUN pip install \ + opentelemetry-exporter-otlp \ + opentelemetry-distro \ + opentelemetry-exporter-otlp-proto-grpc \ + opentelemetry-exporter-otlp-proto-http \ + flask && \ + opentelemetry-bootstrap -a install +COPY . /usr/src/app diff --git a/uptrace/app.py b/uptrace/app.py index a5c71d6..0938a70 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -1,50 +1,160 @@ import os -import sentry_sdk -import sentry_sdk.integrations.flask +import time -from flask import Flask, request, current_app +import grpc - -from opentelemetry import metrics -from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter -from opentelemetry.sdk.metrics import MeterProvider -from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader -from opentelemetry.sdk.resources import SERVICE_NAME, Resource -from opentelemetry.instrumentation.flask import FlaskInstrumentor - - -from opentelemetry import trace +from opentelemetry import trace, metrics +from opentelemetry.sdk import metrics as sdkmetrics +from opentelemetry.sdk.resources import Resource from opentelemetry.sdk.trace import TracerProvider -from opentelemetry.sdk.trace.export import BatchSpanProcessor, ConsoleSpanExporter +from opentelemetry.sdk.trace.export import BatchSpanProcessor +from opentelemetry.sdk.metrics import MeterProvider +from opentelemetry.sdk.metrics.export import ( + AggregationTemporality, + PeriodicExportingMetricReader, +) +from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( + OTLPSpanExporter, +) +from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import ( + OTLPMetricExporter, +) +from opentelemetry.instrumentation.flask import FlaskInstrumentor -# Service name is required for most backends -resource = Resource(attributes={ - SERVICE_NAME: "nino-flask" -}) +from random import randint +from flask import Flask +resource = Resource( + attributes={"service.name": "myservice", "service.version": "1.0.0"} +) +tracer_provider = TracerProvider( + resource=resource, +) +trace.set_tracer_provider(tracer_provider) -# Matrix -reader = PeriodicExportingMetricReader( - OTLPMetricExporter(endpoint="http://otelcol:4317") +exporter = OTLPSpanExporter( + endpoint="http://otelcol:4317", + # Set the Uptrace dsn here or use UPTRACE_DSN env var. + # headers=(("uptrace-dsn", dsn),), + timeout=5, + compression=grpc.Compression.Gzip, ) -meter_provider = MeterProvider(resource=resource, metric_readers=[reader]) -metrics.set_meter_provider(meter_provider) -# Trace -trace_provider = TracerProvider(resource=resource) -processor = BatchSpanProcessor( - ConsoleSpanExporter() +span_processor = BatchSpanProcessor( + exporter, + max_queue_size=1000, + max_export_batch_size=1000, ) -trace_provider.add_span_processor(processor) -trace.set_tracer_provider(trace_provider) +tracer_provider.add_span_processor(span_processor) +tracer = trace.get_tracer("app_or_package_name", "1.0.0") + +# == +# tracer = trace.get_tracer("app_or_package_name", "1.0.0") + +# tracer = trace.get_tracer("diceroller.tracer") +# # Acquire a meter. +# meter = metrics.get_meter("diceroller.meter") +# # Now create a counter instrument to make measurements with +# roll_counter = meter.create_counter( +# "roll_counter", +# description="The number of rolls by roll value", +# ) app = Flask(__name__) FlaskInstrumentor().instrument_app(app) -@app.route("/") -def hello_world(): - return "

Hello, World!

" +@app.route("/rolldice") +def roll_dice(): + return str(do_roll()) + +def do_roll(): + with tracer.start_as_current_span("main") as rollspan: + trace_id = rollspan.get_span_context().trace_id + print(f"trace id: {trace_id:0{32}x}") + res = randint(1, 6) + rollspan.set_attribute("roll.value", res) + # This adds 1 to the counter for the given roll value + # roll_counter.add(1, {"roll.value": res}) + return res + + +# import os +# import sentry_sdk +# import sentry_sdk.integrations.flask + +# from flask import Flask, request, current_app +# from random import randint + + +# from opentelemetry import trace +# from opentelemetry import metrics +# from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter +# from opentelemetry.sdk.metrics import MeterProvider +# from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader +# from opentelemetry.sdk.resources import SERVICE_NAME, Resource +# from opentelemetry.instrumentation.flask import FlaskInstrumentor + + +# from opentelemetry import trace +# from opentelemetry.sdk.trace import TracerProvider +# from opentelemetry.sdk.trace.export import BatchSpanProcessor, ConsoleSpanExporter + + +# # # Service name is required for most backends +# # resource = Resource(attributes={ +# # SERVICE_NAME: "nino-flask" +# # }) + + +# # # Matrix +# # reader = PeriodicExportingMetricReader( +# # OTLPMetricExporter(endpoint="http://otelcol:4317") +# # ) +# # meter_provider = MeterProvider(resource=resource, metric_readers=[reader]) +# # metrics.set_meter_provider(meter_provider) + +# # tracer = trace.get_tracer("diceroller.tracer") +# # # Acquire a meter. +# # meter = metrics.get_meter("diceroller.meter") + +# # # Now create a counter instrument to make measurements with +# # roll_counter = meter.create_counter( +# # "roll_counter", +# # description="The number of rolls by roll value", +# # ) + + +# # # Trace +# # trace_provider = TracerProvider(resource=resource) +# # processor = BatchSpanProcessor( +# # ConsoleSpanExporter() +# # ) +# # trace_provider.add_span_processor(processor) +# # trace.set_tracer_provider(trace_provider) + +# tracer = trace.get_tracer("diceroller.tracer") +# # Acquire a meter. +# meter = metrics.get_meter("diceroller.meter") + +# # Now create a counter instrument to make measurements with +# roll_counter = meter.create_counter( +# "roll_counter", +# description="The number of rolls by roll value", +# ) + + +# app = Flask(__name__) +# # FlaskInstrumentor().instrument_app(app) + +# @app.route("/") +# def hello_world(): +# with tracer.start_as_current_span("do_roll") as rollspan: +# res = randint(1, 6) +# rollspan.set_attribute("roll.value", res) +# # This adds 1 to the counter for the given roll value +# roll_counter.add(1, {"roll.value": res}) +# return str(res) diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 42f6aa6..d544e4e 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -2,17 +2,22 @@ version: '3' services: web: - image: a901002666/opentelemetry:ubutu-python3.10 + build: . + # image: a901002666/opentelemetry:ubutu-python3.10 + # command: sleep 1000 command : > opentelemetry-instrument --traces_exporter console --metrics_exporter console,otlp --logs_exporter console - --service_name nino-flask + --service_name nino-flask-cli --exporter_otlp_endpoint http://otelcol:4317 flask run --host 0.0.0.0 -p 8001 --reload + # command: opentelemetry-instrument flask run --host 0.0.0.0 -p 8001 --reload environment: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt + # env_file: + # - .env volumes: - .:/usr/src/app ports: @@ -54,11 +59,12 @@ services: - '5432:5432' uptrace: - image: 'uptrace/uptrace:1.4.5' + image: 'uptrace/uptrace:1.4.8' #image: 'uptrace/uptrace-dev:latest' restart: on-failure volumes: - ./uptrace.yml:/etc/uptrace/uptrace.yml + - ./config:/usr/local/share/ca-certificates/ # environment: # - DEBUG=2 ports: diff --git a/uptrace/otel-collector.yaml b/uptrace/otel-collector.yaml index 99a7585..aed99e5 100644 --- a/uptrace/otel-collector.yaml +++ b/uptrace/otel-collector.yaml @@ -1,10 +1,3 @@ -extensions: - health_check: - pprof: - endpoint: 0.0.0.0:1777 - zpages: - endpoint: 0.0.0.0:55679 - receivers: otlp: protocols: @@ -12,82 +5,135 @@ receivers: endpoint: 0.0.0.0:4317 http: endpoint: 0.0.0.0:4318 - cors: - allowed_origins: - - http://* - - https://* - # hostmetrics: - # collection_interval: 10s - # scrapers: - # cpu: - # disk: - # load: - # filesystem: - # memory: - # network: - # paging: - jaeger: - protocols: - grpc: - postgresql: - endpoint: postgres:5432 - transport: tcp - username: uptrace - password: uptrace - databases: - - uptrace - tls: - insecure: true - prometheus/otelcol: - config: - scrape_configs: - - job_name: 'otelcol' - scrape_interval: 10s - static_configs: - - targets: ['0.0.0.0:8888'] processors: resourcedetection: - detectors: ['system'] + detectors: [env, system] + cumulativetodelta: batch: send_batch_size: 10000 timeout: 10s exporters: - logging: - loglevel: debug - # verbosity: detailed otlphttp/uptrace: endpoint: http://uptrace:14318 tls: insecure: true headers: - uptrace-dsn: 'http://project2_secret_token@uptrace:14318/2' - otlp/uptrace: - endpoint: http://uptrace:14317 - tls: - insecure: true - headers: - uptrace-dsn: 'http://project2_secret_token@uptrace:14317/2' - + uptrace-dsn: 'http://project2_secret_token@localhost:14318/2' + logging: + loglevel: debug + # verbosity: detailed service: - telemetry: - logs: - level: "debug" pipelines: traces: receivers: [otlp] - # processors: [batch] - exporters: [otlp/uptrace, logging] + processors: [batch] + exporters: [otlphttp/uptrace, logging] metrics: receivers: [otlp] - # processors: [cumulativetodelta, batch, resourcedetection] - exporters: [otlp/uptrace, logging] + processors: [cumulativetodelta, batch, resourcedetection] + exporters: [otlphttp/uptrace, logging] logs: receivers: [otlp] - # processors: [batch] - exporters: [otlp/uptrace, logging] + processors: [batch] + exporters: [otlphttp/uptrace, logging] + +# ===== + +# extensions: +# health_check: +# pprof: +# endpoint: 0.0.0.0:1777 +# zpages: +# endpoint: 0.0.0.0:55679 + +# receivers: +# otlp: +# protocols: +# grpc: +# endpoint: 0.0.0.0:4317 +# http: +# endpoint: 0.0.0.0:4318 +# cors: +# allowed_origins: +# - http://* +# - https://* +# # hostmetrics: +# # collection_interval: 10s +# # scrapers: +# # cpu: +# # disk: +# # load: +# # filesystem: +# # memory: +# # network: +# # paging: +# jaeger: +# protocols: +# grpc: +# postgresql: +# endpoint: postgres:5432 +# transport: tcp +# username: uptrace +# password: uptrace +# databases: +# - uptrace +# tls: +# insecure: true +# prometheus/otelcol: +# config: +# scrape_configs: +# - job_name: 'otelcol' +# scrape_interval: 10s +# static_configs: +# - targets: ['0.0.0.0:8888'] + +# processors: +# resourcedetection: +# detectors: ['system'] +# batch: +# send_batch_size: 10000 +# timeout: 10s + +# exporters: +# logging: +# loglevel: debug +# # verbosity: detailed +# otlphttp/uptrace: +# endpoint: http://uptrace:14317 +# tls: +# insecure: true +# headers: +# uptrace-dsn: 'https://project2_secret_token@localhost:14317/2' +# otlp/uptrace: +# endpoint: http://uptrace:14317 +# tls: +# insecure: true +# headers: +# uptrace-dsn: 'https://project2_secret_token@localhost:14317/2' + + +# service: +# telemetry: +# logs: +# level: "debug" +# pipelines: +# traces: +# receivers: [otlp] +# # processors: [batch] +# exporters: [otlp/uptrace, logging] +# metrics: +# receivers: [otlp] +# # processors: [cumulativetodelta, batch, resourcedetection] +# exporters: [otlp/uptrace, logging] +# logs: +# receivers: [otlp] +# # processors: [batch] +# exporters: [otlp/uptrace, logging] + +# ====== # service: # telemetry: From ee0cdb119dc287c8015942d97e9f57a405d1cc4e Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Sun, 28 May 2023 23:32:11 +0800 Subject: [PATCH 07/17] WIP matrix --- uptrace/app.py | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/uptrace/app.py b/uptrace/app.py index 0938a70..8787f23 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -28,6 +28,8 @@ resource = Resource( attributes={"service.name": "myservice", "service.version": "1.0.0"} ) + +# Trace tracer_provider = TracerProvider( resource=resource, ) @@ -49,24 +51,37 @@ tracer_provider.add_span_processor(span_processor) tracer = trace.get_tracer("app_or_package_name", "1.0.0") -# == -# tracer = trace.get_tracer("app_or_package_name", "1.0.0") -# tracer = trace.get_tracer("diceroller.tracer") -# # Acquire a meter. -# meter = metrics.get_meter("diceroller.meter") +# Metrix +temporality_delta = { + sdkmetrics.Counter: AggregationTemporality.DELTA, + sdkmetrics.UpDownCounter: AggregationTemporality.DELTA, + sdkmetrics.Histogram: AggregationTemporality.DELTA, + sdkmetrics.ObservableCounter: AggregationTemporality.DELTA, + sdkmetrics.ObservableUpDownCounter: AggregationTemporality.DELTA, + sdkmetrics.ObservableGauge: AggregationTemporality.DELTA, +} + +metric_exporter = OTLPMetricExporter( + endpoint="http://otelcol:4317", + # headers=(("uptrace-dsn", dsn),), + timeout=5, + compression=grpc.Compression.Gzip, + preferred_temporality=temporality_delta, +) +reader = PeriodicExportingMetricReader(metric_exporter) +provider = MeterProvider(metric_readers=[reader], resource=resource) +metrics.set_meter_provider(provider) +meter = metrics.get_meter("github.com/uptrace/uptrace-python", "1.0.0") +counter = meter.create_counter("some.prefix.counter", description="TODO") -# # Now create a counter instrument to make measurements with -# roll_counter = meter.create_counter( -# "roll_counter", -# description="The number of rolls by roll value", -# ) app = Flask(__name__) FlaskInstrumentor().instrument_app(app) @app.route("/rolldice") def roll_dice(): + counter.add(1) return str(do_roll()) def do_roll(): From dd6f88098e6d2f61dbe64139120a03a382b6c6bd Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Sun, 4 Jun 2023 15:49:11 +0800 Subject: [PATCH 08/17] WIP --- uptrace/.env | 9 ++ uptrace/app.py | 87 ++----------------- uptrace/config/uptrace.crt | 30 +++++++ uptrace/config/uptrace.key | 52 ++++++++++++ uptrace/docker-compose.yaml | 2 +- uptrace/poetry.lock | 163 ++++++++++++++++++++++++++++++++++++ uptrace/pyproject.toml | 7 +- uptrace/ubuntu-dockerfile | 49 ----------- uptrace/uptrace.yml | 8 +- 9 files changed, 267 insertions(+), 140 deletions(-) create mode 100644 uptrace/.env create mode 100644 uptrace/config/uptrace.crt create mode 100644 uptrace/config/uptrace.key create mode 100644 uptrace/poetry.lock delete mode 100644 uptrace/ubuntu-dockerfile diff --git a/uptrace/.env b/uptrace/.env new file mode 100644 index 0000000..bff904b --- /dev/null +++ b/uptrace/.env @@ -0,0 +1,9 @@ +OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 +OTEL_SERVICE_NAME=nino-flask-cli +# OTEL_TRACES_EXPORTER=console +# OTEL_METRICS_EXPORTER=console +# OTEL_LOGS_EXPORTER=console +OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 +OTEL_PYTHON_LOG_LEVEL=debug +OTEL_TRACES_SAMPLER=always_on +OTEL_BSP_SCHEDULE_DELAY=1000 diff --git a/uptrace/app.py b/uptrace/app.py index 8787f23..4feb140 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -79,9 +79,16 @@ app = Flask(__name__) FlaskInstrumentor().instrument_app(app) +@app.route("/rolldice2") +def toll_dice2(): + return str(randint(1, 6)) + @app.route("/rolldice") def roll_dice(): counter.add(1) + rolled = randint(1, 6) + time.sleep(0.1 * rolled) + return str(rolled) return str(do_roll()) def do_roll(): @@ -93,83 +100,3 @@ def do_roll(): # This adds 1 to the counter for the given roll value # roll_counter.add(1, {"roll.value": res}) return res - - -# import os -# import sentry_sdk -# import sentry_sdk.integrations.flask - -# from flask import Flask, request, current_app -# from random import randint - - -# from opentelemetry import trace -# from opentelemetry import metrics -# from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter -# from opentelemetry.sdk.metrics import MeterProvider -# from opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader -# from opentelemetry.sdk.resources import SERVICE_NAME, Resource -# from opentelemetry.instrumentation.flask import FlaskInstrumentor - - -# from opentelemetry import trace -# from opentelemetry.sdk.trace import TracerProvider -# from opentelemetry.sdk.trace.export import BatchSpanProcessor, ConsoleSpanExporter - - -# # # Service name is required for most backends -# # resource = Resource(attributes={ -# # SERVICE_NAME: "nino-flask" -# # }) - - -# # # Matrix -# # reader = PeriodicExportingMetricReader( -# # OTLPMetricExporter(endpoint="http://otelcol:4317") -# # ) -# # meter_provider = MeterProvider(resource=resource, metric_readers=[reader]) -# # metrics.set_meter_provider(meter_provider) - -# # tracer = trace.get_tracer("diceroller.tracer") -# # # Acquire a meter. -# # meter = metrics.get_meter("diceroller.meter") - -# # # Now create a counter instrument to make measurements with -# # roll_counter = meter.create_counter( -# # "roll_counter", -# # description="The number of rolls by roll value", -# # ) - - -# # # Trace -# # trace_provider = TracerProvider(resource=resource) -# # processor = BatchSpanProcessor( -# # ConsoleSpanExporter() -# # ) -# # trace_provider.add_span_processor(processor) -# # trace.set_tracer_provider(trace_provider) - -# tracer = trace.get_tracer("diceroller.tracer") -# # Acquire a meter. -# meter = metrics.get_meter("diceroller.meter") - -# # Now create a counter instrument to make measurements with -# roll_counter = meter.create_counter( -# "roll_counter", -# description="The number of rolls by roll value", -# ) - - -# app = Flask(__name__) -# # FlaskInstrumentor().instrument_app(app) - -# @app.route("/") -# def hello_world(): -# with tracer.start_as_current_span("do_roll") as rollspan: -# res = randint(1, 6) -# rollspan.set_attribute("roll.value", res) -# # This adds 1 to the counter for the given roll value -# roll_counter.add(1, {"roll.value": res}) -# return str(res) - - diff --git a/uptrace/config/uptrace.crt b/uptrace/config/uptrace.crt new file mode 100644 index 0000000..a18d109 --- /dev/null +++ b/uptrace/config/uptrace.crt @@ -0,0 +1,30 @@ +-----BEGIN CERTIFICATE----- +MIIFHzCCAwegAwIBAgIUBaw6sa4CxZG0HoeTXxvkfYQU0uYwDQYJKoZIhvcNAQEL +BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTIzMDUyODA2NDMxN1oXDTMzMDUy +NTA2NDMxN1owFDESMBAGA1UEAwwJbG9jYWxob3N0MIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEApxMHiQhDg6q5v23qPsDCDqPZKSiJIOtsOhrwvfro8d19 +RnUO+bSXYgwtTrNa5HquTaNCc7/ERyT68RuCa0RJfZNy9rgUXBpH6ODaQ/x8fPgy +Lv7IqSr3Egb77jWPu3zxotNXVj+7vmhSgx76TXoJjryhU46N6rw90c5FjjBdkhwC +NopWH+B8rnrZCAl2VOd5Y6GxphUPgn2j/K/NOKesjnLw75eIpQtTnBxhgD9Lovj2 +4ffK4XNYqEoeqHhvkizcBgV7LATCKnpy9H0Ry2hC6IljOtCnY+4T/m4EJuPFZGhM +dcBFLgC89uv/qUMWJRB0J3lwR8g9Bs6ktFnpxtiwdwzqBquuceiBpK9uNI2gLzfJ +fNr7rooLhtG0iR7rn+50KD5yvWijhq2sOkodEgzlCjThbGY2d95Vee480T6zbHtq +lL1cPTPHVP9saTN2NpvsMx5iKmEmYkm3cK8rsfVQYlnLtNST9WQexLo/h3aC5irK +JNRKE16Rz9EvJCNR0xu8dk6w0IogXTW0bJj6WV3BxY7IwtO8vI8vmUIeG7oMmDx3 +CYJh2zRsEkFt+zcwVJSbuc8Tw9aMCCiqP79hnQXyWdXDWmd39D200nawzyt+rp71 +xV3QEgSx9m5a2iRfF8zhQEUhkW3Z7ISmzdPAvCTQ3hOTd50GJkDj7bElXCWTVLEC +AwEAAaNpMGcwHQYDVR0OBBYEFG244f2Mah9YBWgP7YuybLFtLyb3MB8GA1UdIwQY +MBaAFG244f2Mah9YBWgP7YuybLFtLyb3MA8GA1UdEwEB/wQFMAMBAf8wFAYDVR0R +BA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4ICAQCeiGKKXL7P+N7YkIC9 +6um0KcJLVzdYEVFd4o2n8JnW5qzVSKCI/bZfSEGIBXWI5vOgV7BO+BztNABYtaCt +VNnlAitAqf8BOq1jBn2yWuZzB9lVROSksVvO0HiFChpRo8K8cNa3XNzIEvGmKaYf +ldW90i/Z4uS+Yi2LfEBuL1XgUxumUXXDcWiC/MItbp93SgW1lT2wLGUCXSLWPWNL +f8w2jzJLs98B1G0d6nhx5EmYiCdjfx1RTo/yE/D+g6GkRGrUQeb3tQlg9o0mXB2G +K+PcAO9Op4GC/iNalLETbHkIZQ9ZAXQ7THfX/3weElJhz6GiEn4Brwb3EP5DEULy +9Iv44kCBjB/s7r383USmZYkxJdX9nG6UTCuOzFKGvjOkXaKSOdjw86awWrNnlvcG +o7fddpoFOq+HWiBprPsqjImptSRM2qPVbiEnx+KFigItk36tSdSidG/16or/5KyX +4BN0vkDpg8j/vEBqX7C1TlkXrWWYR1lRzNtFpi16VvV2ht/LdHpPgUTmhVRoG50L +fXY7wP5t0B55cjBC4du7Q3ULXKTOGZCEX3NxHbkp2gCrARSdMYQF5UDbU7n2L7h2 +QPY5U4eZ46uG/Xe340Z2aorJ+PydpDgZ5v/IMK2ZkdbuiJq51C63crO1r/xPDrE7 +gYUrQNr4ZHigXDoiv6qyMHacLA== +-----END CERTIFICATE----- diff --git a/uptrace/config/uptrace.key b/uptrace/config/uptrace.key new file mode 100644 index 0000000..8e4a9f0 --- /dev/null +++ b/uptrace/config/uptrace.key @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQCnEweJCEODqrm/ +beo+wMIOo9kpKIkg62w6GvC9+ujx3X1GdQ75tJdiDC1Os1rkeq5No0Jzv8RHJPrx +G4JrREl9k3L2uBRcGkfo4NpD/Hx8+DIu/sipKvcSBvvuNY+7fPGi01dWP7u+aFKD +HvpNegmOvKFTjo3qvD3RzkWOMF2SHAI2ilYf4HyuetkICXZU53ljobGmFQ+CfaP8 +r804p6yOcvDvl4ilC1OcHGGAP0ui+Pbh98rhc1ioSh6oeG+SLNwGBXssBMIqenL0 +fRHLaELoiWM60Kdj7hP+bgQm48VkaEx1wEUuALz26/+pQxYlEHQneXBHyD0GzqS0 +WenG2LB3DOoGq65x6IGkr240jaAvN8l82vuuiguG0bSJHuuf7nQoPnK9aKOGraw6 +Sh0SDOUKNOFsZjZ33lV57jzRPrNse2qUvVw9M8dU/2xpM3Y2m+wzHmIqYSZiSbdw +ryux9VBiWcu01JP1ZB7Euj+HdoLmKsok1EoTXpHP0S8kI1HTG7x2TrDQiiBdNbRs +mPpZXcHFjsjC07y8jy+ZQh4bugyYPHcJgmHbNGwSQW37NzBUlJu5zxPD1owIKKo/ +v2GdBfJZ1cNaZ3f0PbTSdrDPK36unvXFXdASBLH2blraJF8XzOFARSGRbdnshKbN +08C8JNDeE5N3nQYmQOPtsSVcJZNUsQIDAQABAoICAEKduMxvqhPOt99XISZCT13t +AMKDciHZHL8STNlDOSxvButX80+nLREgD9SoeN5O+D7mkLF8TfOcEB6gvGCuyqqy +Zw1umlea9v8o4H5pJu3hPIk2d6XUBs1+UWdKnfPAvswQfmtaYC5shDHZ4S2RMkxi +c+TQG0/0HKYSG/O03ypJ1qwOfoaZSL19KBonQ7JY1TLfnui8zwFVvVQceLRVTt1B +gUXW4toD6SN+wXWUR0FFCZNR7Of1yOzZGN5NnxbmohgYiWMkxpKPXlSTpcu3163G +UfV6irOykvBIx4kGGoeNeqccsbjE/JNrx/WiVSsUI2w15IoKkiKrtEpg63Cop7s7 +MRNivd/HpwHxCd0u0JJxqBx21CjNNClXb6Hn9Gfx64Uk2RjkuuzaJ/4uZKK1KmlA +ZbzNQaw4PBz8+/zXAEMrS9RlfgPDTFNODowQjGY2rLIZTo2skHCpamsad6vsQZ4v +IuDkKBB0jqpWop7x25EDLPWJIH/r5C0RjviCTYHPiojWmKVnDXZTkbxqTWsoCOUO +MHJzVWIzrclkI3zgCFAG+KZYwanhhqc7hs4EXMz66683W/b3KqKa6iGfuO1PORT1 +e8eCM1MJxQjFKL6GmNbLIgO70qIxR0IK702nCplR9tTV0Hh76Lj0E4rXILfXDVgR ++cwmdllKsXfTMwHRpQoBAoIBAQDXXCfQ7jBSFo+DFOe2hNVNkewasfKhlHDfryjS +JRo2Tu6hUOI5fMcq5XSBbzwXhH38JJboNP51Bjhy9lLopjUWGO6eKtWruPC5DDWG +wW11HNaXtFibIjNk7nDjJbF/L2YBzbN1wDUCvDXLUbQy724Kxc06F4o+x2+W6+OV ++qyrh2mywN4syBqU9BDxxhI35h7qK1MNaCBOuSHgVfg0ctM5FEP/pBQHm6cWCb5g +F/w4W5iwfJP5XgrVXbiIcdy0OLjya7dzzSWy/M0usNfh0ZjdET6eE9ArqSKfl07X +EPH4lUnjDT04OU1TPsHo1BO8lrkfavj65LwrSqyf/HNhTwFRAoIBAQDGmjz73xTj +so3mDwnNz+TPxSNAwc6gTWeijzk2+Xx6TbHqMQOtD7/S09uY+vICODXTWclTHFoc +jGe6LkmPmNQtnUh9oUqFJUzs5zNSLeVins0Kz84AJj6R6c23hV23wxbEoNPpt3tT +lwVsLnBwZDDxsC5HU3PP9Jw5ysVBvQkiuJPItDI0F3/vmuy0PtCVKKwl43e2WAEt +gY49FY2JpRgWVgNTEe0dvc6db4ctOHIl8z4oIYE0mbAciZYY7G4I1Uh059hsRHKU +FXeKEv6SwbGQ3JKazEFW1yoOhxydSyp/MMS8h7t0RB8zKj1JdUE9RrPgQx8BGILy +vneUY7WceUVhAoIBACaKB1YMSflmsCf1BcJT4xgOlQHx9kmUFt7wqY1xtk8hsPKN +Vu6StdGnXkILdeV/gEwvABJt6Vtn0ZJBInUfyUA7FfiYEcS5Q9rZpHqJAt2CW6Sq +UXDxneDiCrGbfTgVc1u/Q+4+hz4GEFpiNK0oy7iBzUgoDkVNy1pmvEOKqHvJr9Cd +UyUQajFdu+qIV5pJRB8DwckUaTOtTbKnr9My+Tmttr14z1zNLglzlO39XNV5DsoG +gTSO78FfFDbWqXhW7kHzpNDEVYrCUrWYUAnJSGHHRD1lrksh6WBF44X5MlQZ4y8O +n3YASyYqhOj1itKk5lwI+KVtaX8Vze6TbtJrIQECggEADZdelwoUPuToSxc6X4hb +q1BdckARKO1DK1/L1ZRLTX9lrpY+HyjVwtLW02hRCY/ZNyaM3ZAyJoQBUT97r0UR +ODHsVRSlqej8k7Xa0EPtz8r4U0YXXfFAFPJALtAEst+5/ijXd8YjvXu3VkjzTu28 +X73j3OO8KD4gNuBGkZIjPuoMyw5x5Ri6m6YpjshBtAN9jHY9qg/pvLiCCHIiJopS +1Kx8O8IdTQzBSArq4FBdl3VHCq4ITpY59CoCSKBdg2M9Oyrmp7ojcTjq3lsgauCw +iy5dJhTWX+AHs8jRT35mYR/wRsqvLGzBCdpZKV7J4SymgLF3PLb1tzELs+8C7btq +4QKCAQB4m+AHgrG9X38+EBlDEaa2+n6PZY6ReszIX24vsphiqyUoVtcRFfBNr7ts +lHnJcixM7Mn2y2HTfJslosFNpNfCBLsc/fFBIMmt2+qKAYPzsihJb/LipBCxvTLm +dUOrnt52TLY+lhErw1vwJh47rJ9Q1rFYL25kfyMF9/KU+oCLzMn2SgVq849TB4bO +Pqrw55/xfe0WmhuWqjwKEE3xrbtaei3bhCjhgm5jdbBnR/fzad7Xa9tTo6qNyZHu +yCBzPk59JlhFakBFwAORWC5fbof1LC82qwVzfTxY3PcLeU0Sb1+oGxyY2WBRUgAb +e149zm2ClhuXXoIvEt6AhLoq2FwY +-----END PRIVATE KEY----- diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index d544e4e..37c60a2 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -13,7 +13,7 @@ services: --service_name nino-flask-cli --exporter_otlp_endpoint http://otelcol:4317 flask run --host 0.0.0.0 -p 8001 --reload - # command: opentelemetry-instrument flask run --host 0.0.0.0 -p 8001 --reload + # command: flask run --host 0.0.0.0 -p 8001 --reload environment: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt # env_file: diff --git a/uptrace/poetry.lock b/uptrace/poetry.lock new file mode 100644 index 0000000..56ce8a7 --- /dev/null +++ b/uptrace/poetry.lock @@ -0,0 +1,163 @@ +[[package]] +name = "click" +version = "8.1.3" +description = "Composable command line interface toolkit" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[[package]] +name = "colorama" +version = "0.4.6" +description = "Cross-platform colored terminal text." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" + +[[package]] +name = "flask" +version = "2.2.3" +description = "A simple framework for building complex web applications." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +click = ">=8.0" +itsdangerous = ">=2.0" +Jinja2 = ">=3.0" +Werkzeug = ">=2.2.2" + +[package.extras] +async = ["asgiref (>=3.2)"] +dotenv = ["python-dotenv"] + +[[package]] +name = "itsdangerous" +version = "2.1.2" +description = "Safely pass data to untrusted environments and back." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "jinja2" +version = "3.1.2" +description = "A very fast and expressive template engine." +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +name = "markupsafe" +version = "2.1.2" +description = "Safely add untrusted strings to HTML/XML markup." +category = "main" +optional = false +python-versions = ">=3.7" + +[[package]] +name = "werkzeug" +version = "2.3.4" +description = "The comprehensive WSGI web application library." +category = "main" +optional = false +python-versions = ">=3.8" + +[package.dependencies] +MarkupSafe = ">=2.1.1" + +[package.extras] +watchdog = ["watchdog (>=2.3)"] + +[metadata] +lock-version = "1.1" +python-versions = "^3.10" +content-hash = "f365b3f6a3a19d4ef41472f06d561534d20aaf6088e03bbf43e1cb2cedeaeaea" + +[metadata.files] +click = [ + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, +] +colorama = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] +flask = [ + {file = "Flask-2.2.3-py3-none-any.whl", hash = "sha256:c0bec9477df1cb867e5a67c9e1ab758de9cb4a3e52dd70681f59fa40a62b3f2d"}, + {file = "Flask-2.2.3.tar.gz", hash = "sha256:7eb373984bf1c770023fce9db164ed0c3353cd0b53f130f4693da0ca756a2e6d"}, +] +itsdangerous = [ + {file = "itsdangerous-2.1.2-py3-none-any.whl", hash = "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44"}, + {file = "itsdangerous-2.1.2.tar.gz", hash = "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"}, +] +jinja2 = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] +markupsafe = [ + {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-win32.whl", hash = "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603"}, + {file = "MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-win32.whl", hash = "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625"}, + {file = "MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-win32.whl", hash = "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859"}, + {file = "MarkupSafe-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-win32.whl", hash = "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2"}, + {file = "MarkupSafe-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-win32.whl", hash = "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7"}, + {file = "MarkupSafe-2.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed"}, + {file = "MarkupSafe-2.1.2.tar.gz", hash = "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"}, +] +werkzeug = [ + {file = "Werkzeug-2.3.4-py3-none-any.whl", hash = "sha256:48e5e61472fee0ddee27ebad085614ebedb7af41e88f687aaf881afb723a162f"}, + {file = "Werkzeug-2.3.4.tar.gz", hash = "sha256:1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76"}, +] diff --git a/uptrace/pyproject.toml b/uptrace/pyproject.toml index 4a37ef3..35a5dd6 100644 --- a/uptrace/pyproject.toml +++ b/uptrace/pyproject.toml @@ -7,13 +7,8 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.10" -sentry-sdk = {extras = ["flask"], version = "1.22.2"} flask = "2.2.3" -requests = "^2.23.0" -opentelemetry-distro = "^0.38b0" -opentelemetry-instrumentation-flask = "^0.38b0" -opentelemetry-exporter-otlp-proto-http = "^1.17.0" -opentelemetry-exporter-otlp-proto-grpc = "^1.17.0" + [build-system] diff --git a/uptrace/ubuntu-dockerfile b/uptrace/ubuntu-dockerfile deleted file mode 100644 index db780a5..0000000 --- a/uptrace/ubuntu-dockerfile +++ /dev/null @@ -1,49 +0,0 @@ -ARG base=python:3.10.11-bullseye - - -FROM ${base} AS poetry -ARG POETRY_VERSION=1.4.0 - -ENV POETRY_VERSION=${POETRY_VERSION} - -RUN apt-get update && \ - apt-get -y install build-essential \ - curl && \ - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py | python - - -### - -FROM ${base} AS builder -WORKDIR /usr/src/app - -ENV PATH=/root/.local/bin:$PATH -ENV POETRY_VIRTUALENVS_CREATE=false -ENV PIP_DISABLE_PIP_VERSION_CHECK=on - -COPY --from=poetry /root/.local /root/.local - -COPY pyproject.toml . -COPY poetry.lock . - - -RUN apt-get update && \ - apt-get -y install build-essential && \ - poetry install -vv -n --only=main --no-root - -### - -FROM ${base} - -WORKDIR /usr/src/app - -ENV PYTHONUNBUFFERED=1 -ENV PATH=/root/.local/bin:$PATH - -EXPOSE 8000/tcp -CMD ["flask", "run", "--host", "0.0.0.0"] - - -COPY --from=poetry /root/.local /root/.local -COPY --from=builder /usr/local /usr/local -COPY . /usr/src/app diff --git a/uptrace/uptrace.yml b/uptrace/uptrace.yml index 665e5d5..0e4aba4 100644 --- a/uptrace/uptrace.yml +++ b/uptrace/uptrace.yml @@ -178,15 +178,15 @@ listen: grpc: addr: ':14317' # tls: - # cert_file: config/tls/uptrace.crt - # key_file: config/tls/uptrace.key + # cert_file: /usr/local/share/ca-certificates//uptrace.crt + # key_file: /usr/local/share/ca-certificates//uptrace.key # OTLP/HTTP API and Uptrace API with UI. http: addr: ':14318' # tls: - # cert_file: config/tls/uptrace.crt - # key_file: config/tls/uptrace.key + # cert_file: /usr/local/share/ca-certificates//uptrace.crt + # key_file: /usr/local/share/ca-certificates//uptrace.key ## ## Various options for Uptrace UI. From 85184baf54b2e3da89fdbefd0dbfd38002c1bd25 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Thu, 22 Jun 2023 16:47:59 +0800 Subject: [PATCH 09/17] Manage packages in poetry --- uptrace/Dockerfile | 49 +- uptrace/poetry.lock | 1141 +++++++++++++++++++++++++++++++++++++--- uptrace/pyproject.toml | 7 + 3 files changed, 1089 insertions(+), 108 deletions(-) diff --git a/uptrace/Dockerfile b/uptrace/Dockerfile index c8696aa..ee11498 100644 --- a/uptrace/Dockerfile +++ b/uptrace/Dockerfile @@ -1,35 +1,35 @@ ARG base=python:3.10.11-bullseye -# FROM ${base} AS poetry -# ARG POETRY_VERSION=1.4.0 +FROM ${base} AS poetry +ARG POETRY_VERSION=1.4.0 -# ENV POETRY_VERSION=${POETRY_VERSION} +ENV POETRY_VERSION=${POETRY_VERSION} -# RUN apt-get update && \ -# apt-get -y install build-essential \ -# curl && \ -# curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py | python +RUN apt-get update && \ + apt-get -y install build-essential \ + curl && \ + curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py | python -# ### +### -# FROM ${base} AS builder -# WORKDIR /usr/src/app +FROM ${base} AS builder +WORKDIR /usr/src/app -# ENV PATH=/root/.local/bin:$PATH -# ENV POETRY_VIRTUALENVS_CREATE=false -# ENV PIP_DISABLE_PIP_VERSION_CHECK=on +ENV PATH=/root/.local/bin:$PATH +ENV POETRY_VIRTUALENVS_CREATE=false +ENV PIP_DISABLE_PIP_VERSION_CHECK=on -# COPY --from=poetry /root/.local /root/.local +COPY --from=poetry /root/.local /root/.local -# COPY pyproject.toml . -# COPY poetry.lock . +COPY pyproject.toml . +COPY poetry.lock . -# RUN apt-get update && \ -# apt-get -y install build-essential && \ -# poetry install -vv -n --only=main --no-root +RUN apt-get update && \ + apt-get -y install build-essential && \ + poetry install -vv -n --only=main --no-root ### @@ -44,13 +44,6 @@ EXPOSE 8000/tcp CMD ["flask", "run", "--host", "0.0.0.0"] -# COPY --from=poetry /root/.local /root/.local -# COPY --from=builder /usr/local /usr/local -RUN pip install \ - opentelemetry-exporter-otlp \ - opentelemetry-distro \ - opentelemetry-exporter-otlp-proto-grpc \ - opentelemetry-exporter-otlp-proto-http \ - flask && \ - opentelemetry-bootstrap -a install +COPY --from=poetry /root/.local /root/.local +COPY --from=builder /usr/local /usr/local COPY . /usr/src/app diff --git a/uptrace/poetry.lock b/uptrace/poetry.lock index 56ce8a7..1150074 100644 --- a/uptrace/poetry.lock +++ b/uptrace/poetry.lock @@ -1,3 +1,191 @@ +# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. + +[[package]] +name = "backoff" +version = "2.2.1" +description = "Function decoration for backoff and retry" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "backoff-2.2.1-py3-none-any.whl", hash = "sha256:63579f9a0628e06278f7e47b7d7d5b6ce20dc65c5e96a6f3ca99a6adca0396e8"}, + {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, +] + +[[package]] +name = "certifi" +version = "2023.5.7" +description = "Python package for providing Mozilla's CA Bundle." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "certifi-2023.5.7-py3-none-any.whl", hash = "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716"}, + {file = "certifi-2023.5.7.tar.gz", hash = "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7"}, +] + +[[package]] +name = "cffi" +version = "1.15.1" +description = "Foreign Function Interface for Python calling C code." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "cffi-1.15.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2"}, + {file = "cffi-1.15.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914"}, + {file = "cffi-1.15.1-cp27-cp27m-win32.whl", hash = "sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3"}, + {file = "cffi-1.15.1-cp27-cp27m-win_amd64.whl", hash = "sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162"}, + {file = "cffi-1.15.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21"}, + {file = "cffi-1.15.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e"}, + {file = "cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01"}, + {file = "cffi-1.15.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e"}, + {file = "cffi-1.15.1-cp310-cp310-win32.whl", hash = "sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2"}, + {file = "cffi-1.15.1-cp310-cp310-win_amd64.whl", hash = "sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac"}, + {file = "cffi-1.15.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325"}, + {file = "cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef"}, + {file = "cffi-1.15.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8"}, + {file = "cffi-1.15.1-cp311-cp311-win32.whl", hash = "sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d"}, + {file = "cffi-1.15.1-cp311-cp311-win_amd64.whl", hash = "sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104"}, + {file = "cffi-1.15.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405"}, + {file = "cffi-1.15.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e"}, + {file = "cffi-1.15.1-cp36-cp36m-win32.whl", hash = "sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf"}, + {file = "cffi-1.15.1-cp36-cp36m-win_amd64.whl", hash = "sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497"}, + {file = "cffi-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c"}, + {file = "cffi-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426"}, + {file = "cffi-1.15.1-cp37-cp37m-win32.whl", hash = "sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9"}, + {file = "cffi-1.15.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045"}, + {file = "cffi-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02"}, + {file = "cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192"}, + {file = "cffi-1.15.1-cp38-cp38-win32.whl", hash = "sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314"}, + {file = "cffi-1.15.1-cp38-cp38-win_amd64.whl", hash = "sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585"}, + {file = "cffi-1.15.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35"}, + {file = "cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76"}, + {file = "cffi-1.15.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3"}, + {file = "cffi-1.15.1-cp39-cp39-win32.whl", hash = "sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee"}, + {file = "cffi-1.15.1-cp39-cp39-win_amd64.whl", hash = "sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c"}, + {file = "cffi-1.15.1.tar.gz", hash = "sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9"}, +] + +[package.dependencies] +pycparser = "*" + +[[package]] +name = "charset-normalizer" +version = "3.1.0" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." +category = "main" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.1.0.tar.gz", hash = "sha256:34e0a2f9c370eb95597aae63bf85eb5e96826d81e3dcf88b8886012906f509b5"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e0ac8959c929593fee38da1c2b64ee9778733cdf03c482c9ff1d508b6b593b2b"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d7fc3fca01da18fbabe4625d64bb612b533533ed10045a2ac3dd194bfa656b60"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20064ead0717cf9a73a6d1e779b23d149b53daf971169289ed2ed43a71e8d3b0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1435ae15108b1cb6fffbcea2af3d468683b7afed0169ad718451f8db5d1aff6f"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c84132a54c750fda57729d1e2599bb598f5fa0344085dbde5003ba429a4798c0"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75f2568b4189dda1c567339b48cba4ac7384accb9c2a7ed655cd86b04055c795"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11d3bcb7be35e7b1bba2c23beedac81ee893ac9871d0ba79effc7fc01167db6c"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:891cf9b48776b5c61c700b55a598621fdb7b1e301a550365571e9624f270c203"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:5f008525e02908b20e04707a4f704cd286d94718f48bb33edddc7d7b584dddc1"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:b06f0d3bf045158d2fb8837c5785fe9ff9b8c93358be64461a1089f5da983137"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:49919f8400b5e49e961f320c735388ee686a62327e773fa5b3ce6721f7e785ce"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:22908891a380d50738e1f978667536f6c6b526a2064156203d418f4856d6e86a"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win32.whl", hash = "sha256:12d1a39aa6b8c6f6248bb54550efcc1c38ce0d8096a146638fd4738e42284448"}, + {file = "charset_normalizer-3.1.0-cp310-cp310-win_amd64.whl", hash = "sha256:65ed923f84a6844de5fd29726b888e58c62820e0769b76565480e1fdc3d062f8"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:9a3267620866c9d17b959a84dd0bd2d45719b817245e49371ead79ed4f710d19"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6734e606355834f13445b6adc38b53c0fd45f1a56a9ba06c2058f86893ae8017"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f8303414c7b03f794347ad062c0516cee0e15f7a612abd0ce1e25caf6ceb47df"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aaf53a6cebad0eae578f062c7d462155eada9c172bd8c4d250b8c1d8eb7f916a"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3dc5b6a8ecfdc5748a7e429782598e4f17ef378e3e272eeb1340ea57c9109f41"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e1b25e3ad6c909f398df8921780d6a3d120d8c09466720226fc621605b6f92b1"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0ca564606d2caafb0abe6d1b5311c2649e8071eb241b2d64e75a0d0065107e62"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b82fab78e0b1329e183a65260581de4375f619167478dddab510c6c6fb04d9b6"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:bd7163182133c0c7701b25e604cf1611c0d87712e56e88e7ee5d72deab3e76b5"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:11d117e6c63e8f495412d37e7dc2e2fff09c34b2d09dbe2bee3c6229577818be"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:cf6511efa4801b9b38dc5546d7547d5b5c6ef4b081c60b23e4d941d0eba9cbeb"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:abc1185d79f47c0a7aaf7e2412a0eb2c03b724581139193d2d82b3ad8cbb00ac"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cb7b2ab0188829593b9de646545175547a70d9a6e2b63bf2cd87a0a391599324"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win32.whl", hash = "sha256:c36bcbc0d5174a80d6cccf43a0ecaca44e81d25be4b7f90f0ed7bcfbb5a00909"}, + {file = "charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl", hash = "sha256:cca4def576f47a09a943666b8f829606bcb17e2bc2d5911a46c8f8da45f56755"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0c95f12b74681e9ae127728f7e5409cbbef9cd914d5896ef238cc779b8152373"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fca62a8301b605b954ad2e9c3666f9d97f63872aa4efcae5492baca2056b74ab"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ac0aa6cd53ab9a31d397f8303f92c42f534693528fafbdb997c82bae6e477ad9"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c3af8e0f07399d3176b179f2e2634c3ce9c1301379a6b8c9c9aeecd481da494f"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a5fc78f9e3f501a1614a98f7c54d3969f3ad9bba8ba3d9b438c3bc5d047dd28"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:628c985afb2c7d27a4800bfb609e03985aaecb42f955049957814e0491d4006d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:74db0052d985cf37fa111828d0dd230776ac99c740e1a758ad99094be4f1803d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:1e8fcdd8f672a1c4fc8d0bd3a2b576b152d2a349782d1eb0f6b8e52e9954731d"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:dd5653e67b149503c68c4018bf07e42eeed6b4e956b24c00ccdf93ac79cdff84"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d2686f91611f9e17f4548dbf050e75b079bbc2a82be565832bc8ea9047b61c8c"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win32.whl", hash = "sha256:4155b51ae05ed47199dc5b2a4e62abccb274cee6b01da5b895099b61b1982974"}, + {file = "charset_normalizer-3.1.0-cp37-cp37m-win_amd64.whl", hash = "sha256:322102cdf1ab682ecc7d9b1c5eed4ec59657a65e1c146a0da342b78f4112db23"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e633940f28c1e913615fd624fcdd72fdba807bf53ea6925d6a588e84e1151531"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3a06f32c9634a8705f4ca9946d667609f52cf130d5548881401f1eb2c39b1e2c"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7381c66e0561c5757ffe616af869b916c8b4e42b367ab29fedc98481d1e74e14"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3573d376454d956553c356df45bb824262c397c6e26ce43e8203c4c540ee0acb"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e89df2958e5159b811af9ff0f92614dabf4ff617c03a4c1c6ff53bf1c399e0e1"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78cacd03e79d009d95635e7d6ff12c21eb89b894c354bd2b2ed0b4763373693b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:de5695a6f1d8340b12a5d6d4484290ee74d61e467c39ff03b39e30df62cf83a0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1c60b9c202d00052183c9be85e5eaf18a4ada0a47d188a83c8f5c5b23252f649"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f645caaf0008bacf349875a974220f1f1da349c5dbe7c4ec93048cdc785a3326"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ea9f9c6034ea2d93d9147818f17c2a0860d41b71c38b9ce4d55f21b6f9165a11"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:80d1543d58bd3d6c271b66abf454d437a438dff01c3e62fdbcd68f2a11310d4b"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:73dc03a6a7e30b7edc5b01b601e53e7fc924b04e1835e8e407c12c037e81adbd"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6f5c2e7bc8a4bf7c426599765b1bd33217ec84023033672c1e9a8b35eaeaaaf8"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win32.whl", hash = "sha256:12a2b561af122e3d94cdb97fe6fb2bb2b82cef0cdca131646fdb940a1eda04f0"}, + {file = "charset_normalizer-3.1.0-cp38-cp38-win_amd64.whl", hash = "sha256:3160a0fd9754aab7d47f95a6b63ab355388d890163eb03b2d2b87ab0a30cfa59"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:38e812a197bf8e71a59fe55b757a84c1f946d0ac114acafaafaf21667a7e169e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6baf0baf0d5d265fa7944feb9f7451cc316bfe30e8df1a61b1bb08577c554f31"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:8f25e17ab3039b05f762b0a55ae0b3632b2e073d9c8fc88e89aca31a6198e88f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3747443b6a904001473370d7810aa19c3a180ccd52a7157aacc264a5ac79265e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b116502087ce8a6b7a5f1814568ccbd0e9f6cfd99948aa59b0e241dc57cf739f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d16fd5252f883eb074ca55cb622bc0bee49b979ae4e8639fff6ca3ff44f9f854"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:21fa558996782fc226b529fdd2ed7866c2c6ec91cee82735c98a197fae39f706"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f6c7a8a57e9405cad7485f4c9d3172ae486cfef1344b5ddd8e5239582d7355e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ac3775e3311661d4adace3697a52ac0bab17edd166087d493b52d4f4f553f9f0"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:10c93628d7497c81686e8e5e557aafa78f230cd9e77dd0c40032ef90c18f2230"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:6f4f4668e1831850ebcc2fd0b1cd11721947b6dc7c00bf1c6bd3c929ae14f2c7"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:0be65ccf618c1e7ac9b849c315cc2e8a8751d9cfdaa43027d4f6624bd587ab7e"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:53d0a3fa5f8af98a1e261de6a3943ca631c526635eb5817a87a59d9a57ebf48f"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win32.whl", hash = "sha256:a04f86f41a8916fe45ac5024ec477f41f886b3c435da2d4e3d2709b22ab02af1"}, + {file = "charset_normalizer-3.1.0-cp39-cp39-win_amd64.whl", hash = "sha256:830d2948a5ec37c386d3170c483063798d7879037492540f10a475e3fd6f244b"}, + {file = "charset_normalizer-3.1.0-py3-none-any.whl", hash = "sha256:3d9098b479e78c85080c98e1e35ff40b4a31d8953102bb0fd7d1b6f8a2111a3d"}, +] + [[package]] name = "click" version = "8.1.3" @@ -5,6 +193,10 @@ description = "Composable command line interface toolkit" category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, +] [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -16,6 +208,28 @@ description = "Cross-platform colored terminal text." category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] + +[[package]] +name = "deprecated" +version = "1.2.14" +description = "Python @deprecated decorator to deprecate old python classes, functions or methods." +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "Deprecated-1.2.14-py2.py3-none-any.whl", hash = "sha256:6fac8b097794a90302bdbb17b9b815e732d3c4720583ff1b198499d78470466c"}, + {file = "Deprecated-1.2.14.tar.gz", hash = "sha256:e5323eb936458dccc2582dc6f9c322c852a775a27065ff2b0c4970b9d53d01b3"}, +] + +[package.dependencies] +wrapt = ">=1.10,<2" + +[package.extras] +dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] [[package]] name = "flask" @@ -24,6 +238,10 @@ description = "A simple framework for building complex web applications." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "Flask-2.2.3-py3-none-any.whl", hash = "sha256:c0bec9477df1cb867e5a67c9e1ab758de9cb4a3e52dd70681f59fa40a62b3f2d"}, + {file = "Flask-2.2.3.tar.gz", hash = "sha256:7eb373984bf1c770023fce9db164ed0c3353cd0b53f130f4693da0ca756a2e6d"}, +] [package.dependencies] click = ">=8.0" @@ -35,6 +253,264 @@ Werkzeug = ">=2.2.2" async = ["asgiref (>=3.2)"] dotenv = ["python-dotenv"] +[[package]] +name = "gevent" +version = "22.10.2" +description = "Coroutine-based network library" +category = "main" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5" +files = [ + {file = "gevent-22.10.2-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:97cd42382421779f5d82ec5007199e8a84aa288114975429e4fd0a98f2290f10"}, + {file = "gevent-22.10.2-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:1e1286a76f15b5e15f1e898731d50529e249529095a032453f2c101af3fde71c"}, + {file = "gevent-22.10.2-cp27-cp27m-win32.whl", hash = "sha256:59b47e81b399d49a5622f0f503c59f1ce57b7705306ea0196818951dfc2f36c8"}, + {file = "gevent-22.10.2-cp27-cp27m-win_amd64.whl", hash = "sha256:1d543c9407a1e4bca11a8932916988cfb16de00366de5bf7bc9e7a3f61e60b18"}, + {file = "gevent-22.10.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4e2f008c82dc54ec94f4de12ca6feea60e419babb48ec145456907ae61625aa4"}, + {file = "gevent-22.10.2-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:990d7069f14dc40674e0d5cb43c68fd3bad8337048613b9bb94a0c4180ffc176"}, + {file = "gevent-22.10.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f23d0997149a816a2a9045af29c66f67f405a221745b34cefeac5769ed451db8"}, + {file = "gevent-22.10.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b43d500d7d3c0e03070dee813335bb5315215aa1cf6a04c61093dfdd718640b3"}, + {file = "gevent-22.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:17b68f4c9e20e47ad49fe797f37f91d5bbeace8765ce2707f979a8d4ec197e4d"}, + {file = "gevent-22.10.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1f001cac0ba8da76abfeb392a3057f81fab3d67cc916c7df8ea977a44a2cc989"}, + {file = "gevent-22.10.2-cp310-cp310-win_amd64.whl", hash = "sha256:3b7eae8a0653ba95a224faaddf629a913ace408edb67384d3117acf42d7dcf89"}, + {file = "gevent-22.10.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:8f2477e7b0a903a01485c55bacf2089110e5f767014967ba4b287ff390ae2638"}, + {file = "gevent-22.10.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ddaa3e310a8f1a45b5c42cf50b54c31003a3028e7d4e085059090ea0e7a5fddd"}, + {file = "gevent-22.10.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98bc510e80f45486ef5b806a1c305e0e89f0430688c14984b0dbdec03331f48b"}, + {file = "gevent-22.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:877abdb3a669576b1d51ce6a49b7260b2a96f6b2424eb93287e779a3219d20ba"}, + {file = "gevent-22.10.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d21ad79cca234cdbfa249e727500b0ddcbc7adfff6614a96e6eaa49faca3e4f2"}, + {file = "gevent-22.10.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e955238f59b2947631c9782a713280dd75884e40e455313b5b6bbc20b92ff73"}, + {file = "gevent-22.10.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:5aa99e4882a9e909b4756ee799c6fa0f79eb0542779fad4cc60efa23ec1b2aa8"}, + {file = "gevent-22.10.2-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:d82081656a5b9a94d37c718c8646c757e1617e389cdc533ea5e6a6f0b8b78545"}, + {file = "gevent-22.10.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:54f4bfd74c178351a4a05c5c7df6f8a0a279ff6f392b57608ce0e83c768207f9"}, + {file = "gevent-22.10.2-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ff3796692dff50fec2f381b9152438b221335f557c4f9b811f7ded51b7a25a1"}, + {file = "gevent-22.10.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f01c9adbcb605364694b11dcd0542ec468a29ac7aba2fb5665dc6caf17ba4d7e"}, + {file = "gevent-22.10.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:9d85574eb729f981fea9a78998725a06292d90a3ed50ddca74530c3148c0be41"}, + {file = "gevent-22.10.2-cp36-cp36m-win32.whl", hash = "sha256:8c192d2073e558e241f0b592c1e2b34127a4481a5be240cad4796533b88b1a98"}, + {file = "gevent-22.10.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a2237451c721a0f874ef89dbb4af4fdc172b76a964befaa69deb15b8fff10f49"}, + {file = "gevent-22.10.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:53ee7f170ed42c7561fe8aff5d381dc9a4124694e70580d0c02fba6aafc0ea37"}, + {file = "gevent-22.10.2-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:96c56c280e3c43cfd075efd10b250350ed5ffd3c1514ec99a080b1b92d7c8374"}, + {file = "gevent-22.10.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b6c144e08dfad4106effc043a026e5d0c0eff6ad031904c70bf5090c63f3a6a7"}, + {file = "gevent-22.10.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:018f93de7d5318d2fb440f846839a4464738468c3476d5c9cf7da45bb71c18bd"}, + {file = "gevent-22.10.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f7ed2346eb9dc4344f9cb0d7963ce5b74fe16fdd031a2809bb6c2b6eba7ebcd5"}, + {file = "gevent-22.10.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:84c517e33ed604fa06b7d756dc0171169cc12f7fdd68eb7b17708a62eebf4516"}, + {file = "gevent-22.10.2-cp37-cp37m-win32.whl", hash = "sha256:4114f0f439f0b547bb6f1d474fee99ddb46736944ad2207cef3771828f6aa358"}, + {file = "gevent-22.10.2-cp37-cp37m-win_amd64.whl", hash = "sha256:0d581f22a5be6281b11ad6309b38b18f0638cf896931223cbaa5adb904826ef6"}, + {file = "gevent-22.10.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2929377c8ebfb6f4d868d161cd8de2ea6b9f6c7a5fcd4f78bcd537319c16190b"}, + {file = "gevent-22.10.2-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:efc003b6c1481165af61f0aeac248e0a9ac8d880bb3acbe469b448674b2d5281"}, + {file = "gevent-22.10.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db562a8519838bddad0c439a2b12246bab539dd50e299ea7ff3644274a33b6a5"}, + {file = "gevent-22.10.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1472012493ca1fac103f700d309cb6ef7964dcdb9c788d1768266e77712f5e49"}, + {file = "gevent-22.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c04ee32c11e9fcee47c1b431834878dc987a7a2cc4fe126ddcae3bad723ce89"}, + {file = "gevent-22.10.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8729129edef2637a8084258cb9ec4e4d5ca45d97ac77aa7a6ff19ccb530ab731"}, + {file = "gevent-22.10.2-cp38-cp38-win32.whl", hash = "sha256:ae90226074a6089371a95f20288431cd4b3f6b0b096856afd862e4ac9510cddd"}, + {file = "gevent-22.10.2-cp38-cp38-win_amd64.whl", hash = "sha256:494c7f29e94df9a1c3157d67bb7edfa32a46eed786e04d9ee68d39f375e30001"}, + {file = "gevent-22.10.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:58898dbabb5b11e4d0192aae165ad286dc6742c543e1be9d30dc82753547c508"}, + {file = "gevent-22.10.2-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:4197d423e198265eef39a0dea286ef389da9148e070310f34455ecee8172c391"}, + {file = "gevent-22.10.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da4183f0b9d9a1e25e1758099220d32c51cc2c6340ee0dea3fd236b2b37598e4"}, + {file = "gevent-22.10.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a5488eba6a568b4d23c072113da4fc0feb1b5f5ede7381656dc913e0d82204e2"}, + {file = "gevent-22.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:319d8b1699b7b8134de66d656cd739b308ab9c45ace14d60ae44de7775b456c9"}, + {file = "gevent-22.10.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f3329bedbba4d3146ae58c667e0f9ac1e6f1e1e6340c7593976cdc60aa7d1a47"}, + {file = "gevent-22.10.2-cp39-cp39-win32.whl", hash = "sha256:172caa66273315f283e90a315921902cb6549762bdcb0587fd60cb712a9d6263"}, + {file = "gevent-22.10.2-cp39-cp39-win_amd64.whl", hash = "sha256:323b207b281ba0405fea042067fa1a61662e5ac0d574ede4ebbda03efd20c350"}, + {file = "gevent-22.10.2-pp27-pypy_73-win_amd64.whl", hash = "sha256:ed7f16613eebf892a6a744d7a4a8f345bc6f066a0ff3b413e2479f9c0a180193"}, + {file = "gevent-22.10.2-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:a47a4e77e2bc668856aad92a0b8de7ee10768258d93cd03968e6c7ba2e832f76"}, + {file = "gevent-22.10.2.tar.gz", hash = "sha256:1ca01da176ee37b3527a2702f7d40dbc9ffb8cfc7be5a03bfa4f9eec45e55c46"}, +] + +[package.dependencies] +cffi = {version = ">=1.12.2", markers = "platform_python_implementation == \"CPython\" and sys_platform == \"win32\""} +greenlet = {version = ">=2.0.0", markers = "platform_python_implementation == \"CPython\""} +setuptools = "*" +"zope.event" = "*" +"zope.interface" = "*" + +[package.extras] +dnspython = ["dnspython (>=1.16.0,<2.0)", "idna"] +docs = ["repoze.sphinx.autointerface", "sphinxcontrib-programoutput", "zope.schema"] +monitor = ["psutil (>=5.7.0)"] +recommended = ["backports.socketpair", "cffi (>=1.12.2)", "dnspython (>=1.16.0,<2.0)", "idna", "psutil (>=5.7.0)", "selectors2"] +test = ["backports.socketpair", "cffi (>=1.12.2)", "contextvars (==2.4)", "coverage (>=5.0)", "coveralls (>=1.7.0)", "dnspython (>=1.16.0,<2.0)", "futures", "idna", "mock", "objgraph", "psutil (>=5.7.0)", "requests", "selectors2"] + +[[package]] +name = "googleapis-common-protos" +version = "1.59.1" +description = "Common protobufs used in Google APIs" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "googleapis-common-protos-1.59.1.tar.gz", hash = "sha256:b35d530fe825fb4227857bc47ad84c33c809ac96f312e13182bdeaa2abe1178a"}, + {file = "googleapis_common_protos-1.59.1-py2.py3-none-any.whl", hash = "sha256:0cbedb6fb68f1c07e18eb4c48256320777707e7d0c55063ae56c15db3224a61e"}, +] + +[package.dependencies] +protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" + +[package.extras] +grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"] + +[[package]] +name = "greenlet" +version = "2.0.2" +description = "Lightweight in-process concurrent programming" +category = "main" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" +files = [ + {file = "greenlet-2.0.2-cp27-cp27m-macosx_10_14_x86_64.whl", hash = "sha256:bdfea8c661e80d3c1c99ad7c3ff74e6e87184895bbaca6ee8cc61209f8b9b85d"}, + {file = "greenlet-2.0.2-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:9d14b83fab60d5e8abe587d51c75b252bcc21683f24699ada8fb275d7712f5a9"}, + {file = "greenlet-2.0.2-cp27-cp27m-win32.whl", hash = "sha256:6c3acb79b0bfd4fe733dff8bc62695283b57949ebcca05ae5c129eb606ff2d74"}, + {file = "greenlet-2.0.2-cp27-cp27m-win_amd64.whl", hash = "sha256:283737e0da3f08bd637b5ad058507e578dd462db259f7f6e4c5c365ba4ee9343"}, + {file = "greenlet-2.0.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d27ec7509b9c18b6d73f2f5ede2622441de812e7b1a80bbd446cb0633bd3d5ae"}, + {file = "greenlet-2.0.2-cp310-cp310-macosx_11_0_x86_64.whl", hash = "sha256:30bcf80dda7f15ac77ba5af2b961bdd9dbc77fd4ac6105cee85b0d0a5fcf74df"}, + {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:26fbfce90728d82bc9e6c38ea4d038cba20b7faf8a0ca53a9c07b67318d46088"}, + {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9190f09060ea4debddd24665d6804b995a9c122ef5917ab26e1566dcc712ceeb"}, + {file = "greenlet-2.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d75209eed723105f9596807495d58d10b3470fa6732dd6756595e89925ce2470"}, + {file = "greenlet-2.0.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:3a51c9751078733d88e013587b108f1b7a1fb106d402fb390740f002b6f6551a"}, + {file = "greenlet-2.0.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:76ae285c8104046b3a7f06b42f29c7b73f77683df18c49ab5af7983994c2dd91"}, + {file = "greenlet-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:2d4686f195e32d36b4d7cf2d166857dbd0ee9f3d20ae349b6bf8afc8485b3645"}, + {file = "greenlet-2.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:c4302695ad8027363e96311df24ee28978162cdcdd2006476c43970b384a244c"}, + {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c48f54ef8e05f04d6eff74b8233f6063cb1ed960243eacc474ee73a2ea8573ca"}, + {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a1846f1b999e78e13837c93c778dcfc3365902cfb8d1bdb7dd73ead37059f0d0"}, + {file = "greenlet-2.0.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a06ad5312349fec0ab944664b01d26f8d1f05009566339ac6f63f56589bc1a2"}, + {file = "greenlet-2.0.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:eff4eb9b7eb3e4d0cae3d28c283dc16d9bed6b193c2e1ace3ed86ce48ea8df19"}, + {file = "greenlet-2.0.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5454276c07d27a740c5892f4907c86327b632127dd9abec42ee62e12427ff7e3"}, + {file = "greenlet-2.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:7cafd1208fdbe93b67c7086876f061f660cfddc44f404279c1585bbf3cdc64c5"}, + {file = "greenlet-2.0.2-cp35-cp35m-macosx_10_14_x86_64.whl", hash = "sha256:910841381caba4f744a44bf81bfd573c94e10b3045ee00de0cbf436fe50673a6"}, + {file = "greenlet-2.0.2-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:18a7f18b82b52ee85322d7a7874e676f34ab319b9f8cce5de06067384aa8ff43"}, + {file = "greenlet-2.0.2-cp35-cp35m-win32.whl", hash = "sha256:03a8f4f3430c3b3ff8d10a2a86028c660355ab637cee9333d63d66b56f09d52a"}, + {file = "greenlet-2.0.2-cp35-cp35m-win_amd64.whl", hash = "sha256:4b58adb399c4d61d912c4c331984d60eb66565175cdf4a34792cd9600f21b394"}, + {file = "greenlet-2.0.2-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:703f18f3fda276b9a916f0934d2fb6d989bf0b4fb5a64825260eb9bfd52d78f0"}, + {file = "greenlet-2.0.2-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:32e5b64b148966d9cccc2c8d35a671409e45f195864560829f395a54226408d3"}, + {file = "greenlet-2.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2dd11f291565a81d71dab10b7033395b7a3a5456e637cf997a6f33ebdf06f8db"}, + {file = "greenlet-2.0.2-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e0f72c9ddb8cd28532185f54cc1453f2c16fb417a08b53a855c4e6a418edd099"}, + {file = "greenlet-2.0.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd021c754b162c0fb55ad5d6b9d960db667faad0fa2ff25bb6e1301b0b6e6a75"}, + {file = "greenlet-2.0.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:3c9b12575734155d0c09d6c3e10dbd81665d5c18e1a7c6597df72fd05990c8cf"}, + {file = "greenlet-2.0.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:b9ec052b06a0524f0e35bd8790686a1da006bd911dd1ef7d50b77bfbad74e292"}, + {file = "greenlet-2.0.2-cp36-cp36m-win32.whl", hash = "sha256:dbfcfc0218093a19c252ca8eb9aee3d29cfdcb586df21049b9d777fd32c14fd9"}, + {file = "greenlet-2.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:9f35ec95538f50292f6d8f2c9c9f8a3c6540bbfec21c9e5b4b751e0a7c20864f"}, + {file = "greenlet-2.0.2-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:d5508f0b173e6aa47273bdc0a0b5ba055b59662ba7c7ee5119528f466585526b"}, + {file = "greenlet-2.0.2-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:f82d4d717d8ef19188687aa32b8363e96062911e63ba22a0cff7802a8e58e5f1"}, + {file = "greenlet-2.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9c59a2120b55788e800d82dfa99b9e156ff8f2227f07c5e3012a45a399620b7"}, + {file = "greenlet-2.0.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2780572ec463d44c1d3ae850239508dbeb9fed38e294c68d19a24d925d9223ca"}, + {file = "greenlet-2.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:937e9020b514ceedb9c830c55d5c9872abc90f4b5862f89c0887033ae33c6f73"}, + {file = "greenlet-2.0.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:36abbf031e1c0f79dd5d596bfaf8e921c41df2bdf54ee1eed921ce1f52999a86"}, + {file = "greenlet-2.0.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:18e98fb3de7dba1c0a852731c3070cf022d14f0d68b4c87a19cc1016f3bb8b33"}, + {file = "greenlet-2.0.2-cp37-cp37m-win32.whl", hash = "sha256:3f6ea9bd35eb450837a3d80e77b517ea5bc56b4647f5502cd28de13675ee12f7"}, + {file = "greenlet-2.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:7492e2b7bd7c9b9916388d9df23fa49d9b88ac0640db0a5b4ecc2b653bf451e3"}, + {file = "greenlet-2.0.2-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:b864ba53912b6c3ab6bcb2beb19f19edd01a6bfcbdfe1f37ddd1778abfe75a30"}, + {file = "greenlet-2.0.2-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:ba2956617f1c42598a308a84c6cf021a90ff3862eddafd20c3333d50f0edb45b"}, + {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fc3a569657468b6f3fb60587e48356fe512c1754ca05a564f11366ac9e306526"}, + {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8eab883b3b2a38cc1e050819ef06a7e6344d4a990d24d45bc6f2cf959045a45b"}, + {file = "greenlet-2.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:acd2162a36d3de67ee896c43effcd5ee3de247eb00354db411feb025aa319857"}, + {file = "greenlet-2.0.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0bf60faf0bc2468089bdc5edd10555bab6e85152191df713e2ab1fcc86382b5a"}, + {file = "greenlet-2.0.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:b0ef99cdbe2b682b9ccbb964743a6aca37905fda5e0452e5ee239b1654d37f2a"}, + {file = "greenlet-2.0.2-cp38-cp38-win32.whl", hash = "sha256:b80f600eddddce72320dbbc8e3784d16bd3fb7b517e82476d8da921f27d4b249"}, + {file = "greenlet-2.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:4d2e11331fc0c02b6e84b0d28ece3a36e0548ee1a1ce9ddde03752d9b79bba40"}, + {file = "greenlet-2.0.2-cp39-cp39-macosx_11_0_x86_64.whl", hash = "sha256:88d9ab96491d38a5ab7c56dd7a3cc37d83336ecc564e4e8816dbed12e5aaefc8"}, + {file = "greenlet-2.0.2-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:561091a7be172ab497a3527602d467e2b3fbe75f9e783d8b8ce403fa414f71a6"}, + {file = "greenlet-2.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:971ce5e14dc5e73715755d0ca2975ac88cfdaefcaab078a284fea6cfabf866df"}, + {file = "greenlet-2.0.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:be4ed120b52ae4d974aa40215fcdfde9194d63541c7ded40ee12eb4dda57b76b"}, + {file = "greenlet-2.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94c817e84245513926588caf1152e3b559ff794d505555211ca041f032abbb6b"}, + {file = "greenlet-2.0.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:1a819eef4b0e0b96bb0d98d797bef17dc1b4a10e8d7446be32d1da33e095dbb8"}, + {file = "greenlet-2.0.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7efde645ca1cc441d6dc4b48c0f7101e8d86b54c8530141b09fd31cef5149ec9"}, + {file = "greenlet-2.0.2-cp39-cp39-win32.whl", hash = "sha256:ea9872c80c132f4663822dd2a08d404073a5a9b5ba6155bea72fb2a79d1093b5"}, + {file = "greenlet-2.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:db1a39669102a1d8d12b57de2bb7e2ec9066a6f2b3da35ae511ff93b01b5d564"}, + {file = "greenlet-2.0.2.tar.gz", hash = "sha256:e7c8dc13af7db097bed64a051d2dd49e9f0af495c26995c00a9ee842690d34c0"}, +] + +[package.extras] +docs = ["Sphinx", "docutils (<0.18)"] +test = ["objgraph", "psutil"] + +[[package]] +name = "grpcio" +version = "1.54.2" +description = "HTTP/2-based RPC framework" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "grpcio-1.54.2-cp310-cp310-linux_armv7l.whl", hash = "sha256:40e1cbf69d6741b40f750f3cccc64326f927ac6145a9914d33879e586002350c"}, + {file = "grpcio-1.54.2-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:2288d76e4d4aa7ef3fe7a73c1c470b66ea68e7969930e746a8cd8eca6ef2a2ea"}, + {file = "grpcio-1.54.2-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:c0e3155fc5335ec7b3b70f15230234e529ca3607b20a562b6c75fb1b1218874c"}, + {file = "grpcio-1.54.2-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bf88004fe086c786dc56ef8dd6cb49c026833fdd6f42cb853008bce3f907148"}, + {file = "grpcio-1.54.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2be88c081e33f20630ac3343d8ad9f1125f32987968e9c8c75c051c9800896e8"}, + {file = "grpcio-1.54.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:33d40954199bddbb6a78f8f6f2b2082660f381cd2583ec860a6c2fa7c8400c08"}, + {file = "grpcio-1.54.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b52d00d1793d290c81ad6a27058f5224a7d5f527867e5b580742e1bd211afeee"}, + {file = "grpcio-1.54.2-cp310-cp310-win32.whl", hash = "sha256:881d058c5ccbea7cc2c92085a11947b572498a27ef37d3eef4887f499054dca8"}, + {file = "grpcio-1.54.2-cp310-cp310-win_amd64.whl", hash = "sha256:0212e2f7fdf7592e4b9d365087da30cb4d71e16a6f213120c89b4f8fb35a3ab3"}, + {file = "grpcio-1.54.2-cp311-cp311-linux_armv7l.whl", hash = "sha256:1e623e0cf99a0ac114f091b3083a1848dbc64b0b99e181473b5a4a68d4f6f821"}, + {file = "grpcio-1.54.2-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:66233ccd2a9371158d96e05d082043d47dadb18cbb294dc5accfdafc2e6b02a7"}, + {file = "grpcio-1.54.2-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:4cb283f630624ebb16c834e5ac3d7880831b07cbe76cb08ab7a271eeaeb8943e"}, + {file = "grpcio-1.54.2-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2a1e601ee31ef30a9e2c601d0867e236ac54c922d32ed9f727b70dd5d82600d5"}, + {file = "grpcio-1.54.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8da84bbc61a4e92af54dc96344f328e5822d574f767e9b08e1602bb5ddc254a"}, + {file = "grpcio-1.54.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5008964885e8d23313c8e5ea0d44433be9bfd7e24482574e8cc43c02c02fc796"}, + {file = "grpcio-1.54.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:a2f5a1f1080ccdc7cbaf1171b2cf384d852496fe81ddedeb882d42b85727f610"}, + {file = "grpcio-1.54.2-cp311-cp311-win32.whl", hash = "sha256:b74ae837368cfffeb3f6b498688a123e6b960951be4dec0e869de77e7fa0439e"}, + {file = "grpcio-1.54.2-cp311-cp311-win_amd64.whl", hash = "sha256:8cdbcbd687e576d48f7886157c95052825ca9948c0ed2afdc0134305067be88b"}, + {file = "grpcio-1.54.2-cp37-cp37m-linux_armv7l.whl", hash = "sha256:782f4f8662a2157c4190d0f99eaaebc602899e84fb1e562a944e5025929e351c"}, + {file = "grpcio-1.54.2-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:714242ad0afa63a2e6dabd522ae22e1d76e07060b5af2ddda5474ba4f14c2c94"}, + {file = "grpcio-1.54.2-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:f900ed4ad7a0f1f05d35f955e0943944d5a75f607a836958c6b8ab2a81730ef2"}, + {file = "grpcio-1.54.2-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96a41817d2c763b1d0b32675abeb9179aa2371c72aefdf74b2d2b99a1b92417b"}, + {file = "grpcio-1.54.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:70fcac7b94f4c904152809a050164650ac81c08e62c27aa9f156ac518029ebbe"}, + {file = "grpcio-1.54.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:fd6c6c29717724acf9fc1847c4515d57e4dc12762452457b9cb37461f30a81bb"}, + {file = "grpcio-1.54.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:c2392f5b5d84b71d853918687d806c1aa4308109e5ca158a16e16a6be71041eb"}, + {file = "grpcio-1.54.2-cp37-cp37m-win_amd64.whl", hash = "sha256:51630c92591d6d3fe488a7c706bd30a61594d144bac7dee20c8e1ce78294f474"}, + {file = "grpcio-1.54.2-cp38-cp38-linux_armv7l.whl", hash = "sha256:b04202453941a63b36876a7172b45366dc0cde10d5fd7855c0f4a4e673c0357a"}, + {file = "grpcio-1.54.2-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:89dde0ac72a858a44a2feb8e43dc68c0c66f7857a23f806e81e1b7cc7044c9cf"}, + {file = "grpcio-1.54.2-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:09d4bfd84686cd36fd11fd45a0732c7628308d094b14d28ea74a81db0bce2ed3"}, + {file = "grpcio-1.54.2-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7fc2b4edb938c8faa4b3c3ea90ca0dd89b7565a049e8e4e11b77e60e4ed2cc05"}, + {file = "grpcio-1.54.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61f7203e2767800edee7a1e1040aaaf124a35ce0c7fe0883965c6b762defe598"}, + {file = "grpcio-1.54.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:e416c8baf925b5a1aff31f7f5aecc0060b25d50cce3a5a7255dc5cf2f1d4e5eb"}, + {file = "grpcio-1.54.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:dc80c9c6b608bf98066a038e0172013a49cfa9a08d53335aefefda2c64fc68f4"}, + {file = "grpcio-1.54.2-cp38-cp38-win32.whl", hash = "sha256:8d6192c37a30a115f4663592861f50e130caed33efc4eec24d92ec881c92d771"}, + {file = "grpcio-1.54.2-cp38-cp38-win_amd64.whl", hash = "sha256:46a057329938b08e5f0e12ea3d7aed3ecb20a0c34c4a324ef34e00cecdb88a12"}, + {file = "grpcio-1.54.2-cp39-cp39-linux_armv7l.whl", hash = "sha256:2296356b5c9605b73ed6a52660b538787094dae13786ba53080595d52df13a98"}, + {file = "grpcio-1.54.2-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:c72956972e4b508dd39fdc7646637a791a9665b478e768ffa5f4fe42123d5de1"}, + {file = "grpcio-1.54.2-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:9bdbb7624d65dc0ed2ed8e954e79ab1724526f09b1efa88dcd9a1815bf28be5f"}, + {file = "grpcio-1.54.2-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4c44e1a765b31e175c391f22e8fc73b2a2ece0e5e6ff042743d8109b5d2eff9f"}, + {file = "grpcio-1.54.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5cc928cfe6c360c1df636cf7991ab96f059666ac7b40b75a769410cc6217df9c"}, + {file = "grpcio-1.54.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:a08920fa1a97d4b8ee5db2f31195de4a9def1a91bc003544eb3c9e6b8977960a"}, + {file = "grpcio-1.54.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:4864f99aac207e3e45c5e26c6cbb0ad82917869abc2f156283be86c05286485c"}, + {file = "grpcio-1.54.2-cp39-cp39-win32.whl", hash = "sha256:b38b3de8cff5bc70f8f9c615f51b48eff7313fc9aca354f09f81b73036e7ddfa"}, + {file = "grpcio-1.54.2-cp39-cp39-win_amd64.whl", hash = "sha256:be48496b0e00460717225e7680de57c38be1d8629dc09dadcd1b3389d70d942b"}, + {file = "grpcio-1.54.2.tar.gz", hash = "sha256:50a9f075eeda5097aa9a182bb3877fe1272875e45370368ac0ee16ab9e22d019"}, +] + +[package.extras] +protobuf = ["grpcio-tools (>=1.54.2)"] + +[[package]] +name = "idna" +version = "3.4" +description = "Internationalized Domain Names in Applications (IDNA)" +category = "main" +optional = false +python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] + +[[package]] +name = "importlib-metadata" +version = "6.0.1" +description = "Read metadata from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.0.1-py3-none-any.whl", hash = "sha256:1543daade821c89b1c4a55986c326f36e54f2e6ca3bad96be4563d0acb74dcd4"}, + {file = "importlib_metadata-6.0.1.tar.gz", hash = "sha256:950127d57e35a806d520817d3e92eec3f19fdae9f0cd99da77a407c5aabefba3"}, +] + +[package.dependencies] +zipp = ">=0.5" + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +perf = ["ipython"] +testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"] + [[package]] name = "itsdangerous" version = "2.1.2" @@ -42,6 +518,10 @@ description = "Safely pass data to untrusted environments and back." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "itsdangerous-2.1.2-py3-none-any.whl", hash = "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44"}, + {file = "itsdangerous-2.1.2.tar.gz", hash = "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"}, +] [[package]] name = "jinja2" @@ -50,6 +530,10 @@ description = "A very fast and expressive template engine." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -59,19 +543,426 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markupsafe" -version = "2.1.2" +version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." category = "main" optional = false python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] + +[[package]] +name = "opentelemetry-api" +version = "1.18.0" +description = "OpenTelemetry Python API" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_api-1.18.0-py3-none-any.whl", hash = "sha256:d05bcc94ec239fd76fd90d784c5e3ad081a8a1ac2ffc8a2c83a49ace052d1492"}, + {file = "opentelemetry_api-1.18.0.tar.gz", hash = "sha256:2bbf29739fcef268c419e3bf1735566c2e7f81026c14bcc78b62a0b97f8ecf2f"}, +] + +[package.dependencies] +deprecated = ">=1.2.6" +importlib-metadata = ">=6.0.0,<6.1.0" +setuptools = ">=16.0" + +[[package]] +name = "opentelemetry-distro" +version = "0.39b0" +description = "OpenTelemetry Python Distro" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_distro-0.39b0-py3-none-any.whl", hash = "sha256:5e29abbdde6766fd8debe45fe460350daa9161b926b1a3998ffcd371f8f3f525"}, + {file = "opentelemetry_distro-0.39b0.tar.gz", hash = "sha256:994066df104e0b4ee857708851509806e246a7cfd1ad3c8f875b8d4c4bf72e96"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-sdk = ">=1.13,<2.0" + +[package.extras] +otlp = ["opentelemetry-exporter-otlp (==1.18.0)"] + +[[package]] +name = "opentelemetry-exporter-otlp" +version = "1.18.0" +description = "OpenTelemetry Collector Exporters" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp-1.18.0-py3-none-any.whl", hash = "sha256:2b8d18aa3f8fa360df2fe6c274132cf38939a02f8aa621d6ed060a920aa9e4c6"}, + {file = "opentelemetry_exporter_otlp-1.18.0.tar.gz", hash = "sha256:cafcf7f28debbcc22e06d52cdc4f65a118f17b730dabe8f9d4b87587e95b1481"}, +] + +[package.dependencies] +opentelemetry-exporter-otlp-proto-grpc = "1.18.0" +opentelemetry-exporter-otlp-proto-http = "1.18.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-common" +version = "1.18.0" +description = "OpenTelemetry Protobuf encoding" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp_proto_common-1.18.0-py3-none-any.whl", hash = "sha256:276073ccc8c6e6570fe05ca8ca0de77d662bc89bc614ec8bfbc855112f7e25e3"}, + {file = "opentelemetry_exporter_otlp_proto_common-1.18.0.tar.gz", hash = "sha256:4d9883d6929aabe75e485950bbe8b149a14d95e50b1570426832daa6913b0871"}, +] + +[package.dependencies] +opentelemetry-proto = "1.18.0" + +[[package]] +name = "opentelemetry-exporter-otlp-proto-grpc" +version = "1.18.0" +description = "OpenTelemetry Collector Protobuf over gRPC Exporter" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp_proto_grpc-1.18.0-py3-none-any.whl", hash = "sha256:c773bc9df2c9d6464f0d5936963399b2fc440f0616c1277f29512d540ad7e0a2"}, + {file = "opentelemetry_exporter_otlp_proto_grpc-1.18.0.tar.gz", hash = "sha256:8eddfde4267da876871e62f1b58369986bdb7e47e43032c498f1ea807d7191c4"}, +] + +[package.dependencies] +backoff = {version = ">=1.10.0,<3.0.0", markers = "python_version >= \"3.7\""} +deprecated = ">=1.2.6" +googleapis-common-protos = ">=1.52,<2.0" +grpcio = ">=1.0.0,<2.0.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-exporter-otlp-proto-common = "1.18.0" +opentelemetry-proto = "1.18.0" +opentelemetry-sdk = ">=1.18.0,<1.19.0" + +[package.extras] +test = ["pytest-grpc"] + +[[package]] +name = "opentelemetry-exporter-otlp-proto-http" +version = "1.18.0" +description = "OpenTelemetry Collector Protobuf over HTTP Exporter" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_exporter_otlp_proto_http-1.18.0-py3-none-any.whl", hash = "sha256:c22110705473f1c61bd4d74ded3b8bd3fac66ffbe7d9ba376267d8539919ed90"}, + {file = "opentelemetry_exporter_otlp_proto_http-1.18.0.tar.gz", hash = "sha256:d9a2118558decf9e9a2d6573ad9d33876f3a44d7dc43f10d38a900d5a6f867d6"}, +] + +[package.dependencies] +backoff = {version = ">=1.10.0,<3.0.0", markers = "python_version >= \"3.7\""} +deprecated = ">=1.2.6" +googleapis-common-protos = ">=1.52,<2.0" +opentelemetry-api = ">=1.15,<2.0" +opentelemetry-exporter-otlp-proto-common = "1.18.0" +opentelemetry-proto = "1.18.0" +opentelemetry-sdk = ">=1.18.0,<1.19.0" +requests = ">=2.7,<3.0" + +[package.extras] +test = ["responses (==0.22.0)"] + +[[package]] +name = "opentelemetry-instrumentation" +version = "0.39b0" +description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation-0.39b0-py3-none-any.whl", hash = "sha256:fcfd74413159fe797e343104f7e85a3f8146713634debcac10a057ac7f1eb011"}, + {file = "opentelemetry_instrumentation-0.39b0.tar.gz", hash = "sha256:2a6d1f386aa769dc763e6f2c6b483f50c4024f1bc76a78b57f05ae05970ce5f4"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.4,<2.0" +setuptools = ">=16.0" +wrapt = ">=1.0.0,<2.0.0" + +[[package]] +name = "opentelemetry-instrumentation-flask" +version = "0.39b0" +description = "Flask instrumentation for OpenTelemetry" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_flask-0.39b0-py3-none-any.whl", hash = "sha256:ac6cd9b54ca36de96d222246fcc2e8a38a169f46214c0994aba79bd9598669d2"}, + {file = "opentelemetry_instrumentation_flask-0.39b0.tar.gz", hash = "sha256:ecb2858e5ef634b0eea8fa87c06bc3898875da8c4f5268a70fcaff1b3eda6bc2"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-instrumentation-wsgi = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" +opentelemetry-util-http = "0.39b0" + +[package.extras] +instruments = ["flask (>=1.0,<3.0)"] +test = ["markupsafe (==2.0.1)", "opentelemetry-instrumentation-flask[instruments]", "opentelemetry-test-utils (==0.39b0)"] + +[[package]] +name = "opentelemetry-instrumentation-wsgi" +version = "0.39b0" +description = "WSGI Middleware for OpenTelemetry" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_wsgi-0.39b0-py3-none-any.whl", hash = "sha256:1b0e2d5c68e09f13ebdee083de7777b3ea32b046a9544e8c083ddfe044b996f4"}, + {file = "opentelemetry_instrumentation_wsgi-0.39b0.tar.gz", hash = "sha256:53a308183e58ce5303ecb88ad4c1ac83daa608855f06c848df2ef52d272de6ad"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" +opentelemetry-util-http = "0.39b0" + +[package.extras] +test = ["opentelemetry-test-utils (==0.39b0)"] + +[[package]] +name = "opentelemetry-proto" +version = "1.18.0" +description = "OpenTelemetry Python Proto" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_proto-1.18.0-py3-none-any.whl", hash = "sha256:34d1c49283f0246a58761d9322d5a79702a09afda0bb181bb6378ed26862e446"}, + {file = "opentelemetry_proto-1.18.0.tar.gz", hash = "sha256:4f38d01049c3926b9fd09833574bfb5e172d84c8ca85e2ab7f4b5a198d75aeef"}, +] + +[package.dependencies] +protobuf = ">=3.19,<5.0" + +[[package]] +name = "opentelemetry-sdk" +version = "1.18.0" +description = "OpenTelemetry Python SDK" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_sdk-1.18.0-py3-none-any.whl", hash = "sha256:a097cc1e0db6ff33b4d250a9350dc17975d24a22aa667fca2866e60c51306723"}, + {file = "opentelemetry_sdk-1.18.0.tar.gz", hash = "sha256:cd3230930a2ab288b1df149d261e9cd2bd48dee54ad18465a777831cb6779e90"}, +] + +[package.dependencies] +opentelemetry-api = "1.18.0" +opentelemetry-semantic-conventions = "0.39b0" +setuptools = ">=16.0" +typing-extensions = ">=3.7.4" + +[[package]] +name = "opentelemetry-semantic-conventions" +version = "0.39b0" +description = "OpenTelemetry Semantic Conventions" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_semantic_conventions-0.39b0-py3-none-any.whl", hash = "sha256:0dd7a9dc0dfde2335f643705bba8f7c44182c797bc208b7601f0b8e8211cfd5c"}, + {file = "opentelemetry_semantic_conventions-0.39b0.tar.gz", hash = "sha256:06a9f198574e0dab6ebc072b59d89092cf9f115638a8a02157586769b6b7a69a"}, +] + +[[package]] +name = "opentelemetry-util-http" +version = "0.39b0" +description = "Web util for OpenTelemetry" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_util_http-0.39b0-py3-none-any.whl", hash = "sha256:587c3f8931b8a1e910a04fd736e8ff1386fe25c09dc92dc85104679112221483"}, + {file = "opentelemetry_util_http-0.39b0.tar.gz", hash = "sha256:1a78e53e97c8f0b05216dbe4d93836ae5f5f94ba877003e56d065f089373f0ce"}, +] + +[[package]] +name = "protobuf" +version = "4.23.3" +description = "" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "protobuf-4.23.3-cp310-abi3-win32.whl", hash = "sha256:514b6bbd54a41ca50c86dd5ad6488afe9505901b3557c5e0f7823a0cf67106fb"}, + {file = "protobuf-4.23.3-cp310-abi3-win_amd64.whl", hash = "sha256:cc14358a8742c4e06b1bfe4be1afbdf5c9f6bd094dff3e14edb78a1513893ff5"}, + {file = "protobuf-4.23.3-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:2991f5e7690dab569f8f81702e6700e7364cc3b5e572725098215d3da5ccc6ac"}, + {file = "protobuf-4.23.3-cp37-abi3-manylinux2014_aarch64.whl", hash = "sha256:08fe19d267608d438aa37019236db02b306e33f6b9902c3163838b8e75970223"}, + {file = "protobuf-4.23.3-cp37-abi3-manylinux2014_x86_64.whl", hash = "sha256:3b01a5274ac920feb75d0b372d901524f7e3ad39c63b1a2d55043f3887afe0c1"}, + {file = "protobuf-4.23.3-cp37-cp37m-win32.whl", hash = "sha256:aca6e86a08c5c5962f55eac9b5bd6fce6ed98645d77e8bfc2b952ecd4a8e4f6a"}, + {file = "protobuf-4.23.3-cp37-cp37m-win_amd64.whl", hash = "sha256:0149053336a466e3e0b040e54d0b615fc71de86da66791c592cc3c8d18150bf8"}, + {file = "protobuf-4.23.3-cp38-cp38-win32.whl", hash = "sha256:84ea0bd90c2fdd70ddd9f3d3fc0197cc24ecec1345856c2b5ba70e4d99815359"}, + {file = "protobuf-4.23.3-cp38-cp38-win_amd64.whl", hash = "sha256:3bcbeb2bf4bb61fe960dd6e005801a23a43578200ea8ceb726d1f6bd0e562ba1"}, + {file = "protobuf-4.23.3-cp39-cp39-win32.whl", hash = "sha256:5cb9e41188737f321f4fce9a4337bf40a5414b8d03227e1d9fbc59bc3a216e35"}, + {file = "protobuf-4.23.3-cp39-cp39-win_amd64.whl", hash = "sha256:29660574cd769f2324a57fb78127cda59327eb6664381ecfe1c69731b83e8288"}, + {file = "protobuf-4.23.3-py3-none-any.whl", hash = "sha256:447b9786ac8e50ae72cae7a2eec5c5df6a9dbf9aa6f908f1b8bda6032644ea62"}, + {file = "protobuf-4.23.3.tar.gz", hash = "sha256:7a92beb30600332a52cdadbedb40d33fd7c8a0d7f549c440347bc606fb3fe34b"}, +] + +[[package]] +name = "pycparser" +version = "2.21" +description = "C parser in Python" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "pycparser-2.21-py2.py3-none-any.whl", hash = "sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9"}, + {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, +] + +[[package]] +name = "requests" +version = "2.31.0" +description = "Python HTTP for Humans." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] + +[package.dependencies] +certifi = ">=2017.4.17" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" + +[package.extras] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] + +[[package]] +name = "setuptools" +version = "68.0.0" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "setuptools-68.0.0-py3-none-any.whl", hash = "sha256:11e52c67415a381d10d6b462ced9cfb97066179f0e871399e006c4ab101fc85f"}, + {file = "setuptools-68.0.0.tar.gz", hash = "sha256:baf1fdb41c6da4cd2eae722e135500da913332ab3f2f5c7d33af9b492acb5235"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-hoverxref (<2)", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (==0.8.3)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + +[[package]] +name = "typing-extensions" +version = "4.6.3" +description = "Backported and Experimental Type Hints for Python 3.7+" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"}, + {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, +] + +[[package]] +name = "urllib3" +version = "2.0.3" +description = "HTTP library with thread-safe connection pooling, file post, and more." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "urllib3-2.0.3-py3-none-any.whl", hash = "sha256:48e7fafa40319d358848e1bc6809b208340fafe2096f1725d05d67443d0483d1"}, + {file = "urllib3-2.0.3.tar.gz", hash = "sha256:bee28b5e56addb8226c96f7f13ac28cb4c301dd5ea8a6ca179c0b9835e032825"}, +] + +[package.extras] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] + +[[package]] +name = "uwsgi" +version = "2.0.21" +description = "The uWSGI server" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "uwsgi-2.0.21.tar.gz", hash = "sha256:35a30d83791329429bc04fe44183ce4ab512fcf6968070a7bfba42fc5a0552a9"}, +] [[package]] name = "werkzeug" -version = "2.3.4" +version = "2.3.6" description = "The comprehensive WSGI web application library." category = "main" optional = false python-versions = ">=3.8" +files = [ + {file = "Werkzeug-2.3.6-py3-none-any.whl", hash = "sha256:935539fa1413afbb9195b24880778422ed620c0fc09670945185cce4d91a8890"}, + {file = "Werkzeug-2.3.6.tar.gz", hash = "sha256:98c774df2f91b05550078891dee5f0eb0cb797a522c757a2452b9cee5b202330"}, +] [package.dependencies] MarkupSafe = ">=2.1.1" @@ -79,85 +970,175 @@ MarkupSafe = ">=2.1.1" [package.extras] watchdog = ["watchdog (>=2.3)"] -[metadata] -lock-version = "1.1" -python-versions = "^3.10" -content-hash = "f365b3f6a3a19d4ef41472f06d561534d20aaf6088e03bbf43e1cb2cedeaeaea" - -[metadata.files] -click = [ - {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, - {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, -] -colorama = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] -flask = [ - {file = "Flask-2.2.3-py3-none-any.whl", hash = "sha256:c0bec9477df1cb867e5a67c9e1ab758de9cb4a3e52dd70681f59fa40a62b3f2d"}, - {file = "Flask-2.2.3.tar.gz", hash = "sha256:7eb373984bf1c770023fce9db164ed0c3353cd0b53f130f4693da0ca756a2e6d"}, +[[package]] +name = "wrapt" +version = "1.15.0" +description = "Module for decorators, wrappers and monkey patching." +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +files = [ + {file = "wrapt-1.15.0-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:ca1cccf838cd28d5a0883b342474c630ac48cac5df0ee6eacc9c7290f76b11c1"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e826aadda3cae59295b95343db8f3d965fb31059da7de01ee8d1c40a60398b29"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:5fc8e02f5984a55d2c653f5fea93531e9836abbd84342c1d1e17abc4a15084c2"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:96e25c8603a155559231c19c0349245eeb4ac0096fe3c1d0be5c47e075bd4f46"}, + {file = "wrapt-1.15.0-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:40737a081d7497efea35ab9304b829b857f21558acfc7b3272f908d33b0d9d4c"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:f87ec75864c37c4c6cb908d282e1969e79763e0d9becdfe9fe5473b7bb1e5f09"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:1286eb30261894e4c70d124d44b7fd07825340869945c79d05bda53a40caa079"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:493d389a2b63c88ad56cdc35d0fa5752daac56ca755805b1b0c530f785767d5e"}, + {file = "wrapt-1.15.0-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:58d7a75d731e8c63614222bcb21dd992b4ab01a399f1f09dd82af17bbfc2368a"}, + {file = "wrapt-1.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:21f6d9a0d5b3a207cdf7acf8e58d7d13d463e639f0c7e01d82cdb671e6cb7923"}, + {file = "wrapt-1.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ce42618f67741d4697684e501ef02f29e758a123aa2d669e2d964ff734ee00ee"}, + {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41d07d029dd4157ae27beab04d22b8e261eddfc6ecd64ff7000b10dc8b3a5727"}, + {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:54accd4b8bc202966bafafd16e69da9d5640ff92389d33d28555c5fd4f25ccb7"}, + {file = "wrapt-1.15.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2fbfbca668dd15b744418265a9607baa970c347eefd0db6a518aaf0cfbd153c0"}, + {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:76e9c727a874b4856d11a32fb0b389afc61ce8aaf281ada613713ddeadd1cfec"}, + {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:e20076a211cd6f9b44a6be58f7eeafa7ab5720eb796975d0c03f05b47d89eb90"}, + {file = "wrapt-1.15.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a74d56552ddbde46c246b5b89199cb3fd182f9c346c784e1a93e4dc3f5ec9975"}, + {file = "wrapt-1.15.0-cp310-cp310-win32.whl", hash = "sha256:26458da5653aa5b3d8dc8b24192f574a58984c749401f98fff994d41d3f08da1"}, + {file = "wrapt-1.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:75760a47c06b5974aa5e01949bf7e66d2af4d08cb8c1d6516af5e39595397f5e"}, + {file = "wrapt-1.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ba1711cda2d30634a7e452fc79eabcadaffedf241ff206db2ee93dd2c89a60e7"}, + {file = "wrapt-1.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:56374914b132c702aa9aa9959c550004b8847148f95e1b824772d453ac204a72"}, + {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a89ce3fd220ff144bd9d54da333ec0de0399b52c9ac3d2ce34b569cf1a5748fb"}, + {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bbe623731d03b186b3d6b0d6f51865bf598587c38d6f7b0be2e27414f7f214e"}, + {file = "wrapt-1.15.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3abbe948c3cbde2689370a262a8d04e32ec2dd4f27103669a45c6929bcdbfe7c"}, + {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b67b819628e3b748fd3c2192c15fb951f549d0f47c0449af0764d7647302fda3"}, + {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:7eebcdbe3677e58dd4c0e03b4f2cfa346ed4049687d839adad68cc38bb559c92"}, + {file = "wrapt-1.15.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:74934ebd71950e3db69960a7da29204f89624dde411afbfb3b4858c1409b1e98"}, + {file = "wrapt-1.15.0-cp311-cp311-win32.whl", hash = "sha256:bd84395aab8e4d36263cd1b9308cd504f6cf713b7d6d3ce25ea55670baec5416"}, + {file = "wrapt-1.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:a487f72a25904e2b4bbc0817ce7a8de94363bd7e79890510174da9d901c38705"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:4ff0d20f2e670800d3ed2b220d40984162089a6e2c9646fdb09b85e6f9a8fc29"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:9ed6aa0726b9b60911f4aed8ec5b8dd7bf3491476015819f56473ffaef8959bd"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:896689fddba4f23ef7c718279e42f8834041a21342d95e56922e1c10c0cc7afb"}, + {file = "wrapt-1.15.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:75669d77bb2c071333417617a235324a1618dba66f82a750362eccbe5b61d248"}, + {file = "wrapt-1.15.0-cp35-cp35m-win32.whl", hash = "sha256:fbec11614dba0424ca72f4e8ba3c420dba07b4a7c206c8c8e4e73f2e98f4c559"}, + {file = "wrapt-1.15.0-cp35-cp35m-win_amd64.whl", hash = "sha256:fd69666217b62fa5d7c6aa88e507493a34dec4fa20c5bd925e4bc12fce586639"}, + {file = "wrapt-1.15.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:b0724f05c396b0a4c36a3226c31648385deb6a65d8992644c12a4963c70326ba"}, + {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbeccb1aa40ab88cd29e6c7d8585582c99548f55f9b2581dfc5ba68c59a85752"}, + {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:38adf7198f8f154502883242f9fe7333ab05a5b02de7d83aa2d88ea621f13364"}, + {file = "wrapt-1.15.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:578383d740457fa790fdf85e6d346fda1416a40549fe8db08e5e9bd281c6a475"}, + {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a4cbb9ff5795cd66f0066bdf5947f170f5d63a9274f99bdbca02fd973adcf2a8"}, + {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:af5bd9ccb188f6a5fdda9f1f09d9f4c86cc8a539bd48a0bfdc97723970348418"}, + {file = "wrapt-1.15.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:b56d5519e470d3f2fe4aa7585f0632b060d532d0696c5bdfb5e8319e1d0f69a2"}, + {file = "wrapt-1.15.0-cp36-cp36m-win32.whl", hash = "sha256:77d4c1b881076c3ba173484dfa53d3582c1c8ff1f914c6461ab70c8428b796c1"}, + {file = "wrapt-1.15.0-cp36-cp36m-win_amd64.whl", hash = "sha256:077ff0d1f9d9e4ce6476c1a924a3332452c1406e59d90a2cf24aeb29eeac9420"}, + {file = "wrapt-1.15.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5c5aa28df055697d7c37d2099a7bc09f559d5053c3349b1ad0c39000e611d317"}, + {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3a8564f283394634a7a7054b7983e47dbf39c07712d7b177b37e03f2467a024e"}, + {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:780c82a41dc493b62fc5884fb1d3a3b81106642c5c5c78d6a0d4cbe96d62ba7e"}, + {file = "wrapt-1.15.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e169e957c33576f47e21864cf3fc9ff47c223a4ebca8960079b8bd36cb014fd0"}, + {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b02f21c1e2074943312d03d243ac4388319f2456576b2c6023041c4d57cd7019"}, + {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f2e69b3ed24544b0d3dbe2c5c0ba5153ce50dcebb576fdc4696d52aa22db6034"}, + {file = "wrapt-1.15.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d787272ed958a05b2c86311d3a4135d3c2aeea4fc655705f074130aa57d71653"}, + {file = "wrapt-1.15.0-cp37-cp37m-win32.whl", hash = "sha256:02fce1852f755f44f95af51f69d22e45080102e9d00258053b79367d07af39c0"}, + {file = "wrapt-1.15.0-cp37-cp37m-win_amd64.whl", hash = "sha256:abd52a09d03adf9c763d706df707c343293d5d106aea53483e0ec8d9e310ad5e"}, + {file = "wrapt-1.15.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:cdb4f085756c96a3af04e6eca7f08b1345e94b53af8921b25c72f096e704e145"}, + {file = "wrapt-1.15.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:230ae493696a371f1dbffaad3dafbb742a4d27a0afd2b1aecebe52b740167e7f"}, + {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63424c681923b9f3bfbc5e3205aafe790904053d42ddcc08542181a30a7a51bd"}, + {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6bcbfc99f55655c3d93feb7ef3800bd5bbe963a755687cbf1f490a71fb7794b"}, + {file = "wrapt-1.15.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c99f4309f5145b93eca6e35ac1a988f0dc0a7ccf9ccdcd78d3c0adf57224e62f"}, + {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b130fe77361d6771ecf5a219d8e0817d61b236b7d8b37cc045172e574ed219e6"}, + {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:96177eb5645b1c6985f5c11d03fc2dbda9ad24ec0f3a46dcce91445747e15094"}, + {file = "wrapt-1.15.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:d5fe3e099cf07d0fb5a1e23d399e5d4d1ca3e6dfcbe5c8570ccff3e9208274f7"}, + {file = "wrapt-1.15.0-cp38-cp38-win32.whl", hash = "sha256:abd8f36c99512755b8456047b7be10372fca271bf1467a1caa88db991e7c421b"}, + {file = "wrapt-1.15.0-cp38-cp38-win_amd64.whl", hash = "sha256:b06fa97478a5f478fb05e1980980a7cdf2712015493b44d0c87606c1513ed5b1"}, + {file = "wrapt-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:2e51de54d4fb8fb50d6ee8327f9828306a959ae394d3e01a1ba8b2f937747d86"}, + {file = "wrapt-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0970ddb69bba00670e58955f8019bec4a42d1785db3faa043c33d81de2bf843c"}, + {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:76407ab327158c510f44ded207e2f76b657303e17cb7a572ffe2f5a8a48aa04d"}, + {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd525e0e52a5ff16653a3fc9e3dd827981917d34996600bbc34c05d048ca35cc"}, + {file = "wrapt-1.15.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d37ac69edc5614b90516807de32d08cb8e7b12260a285ee330955604ed9dd29"}, + {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:078e2a1a86544e644a68422f881c48b84fef6d18f8c7a957ffd3f2e0a74a0d4a"}, + {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2cf56d0e237280baed46f0b5316661da892565ff58309d4d2ed7dba763d984b8"}, + {file = "wrapt-1.15.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7dc0713bf81287a00516ef43137273b23ee414fe41a3c14be10dd95ed98a2df9"}, + {file = "wrapt-1.15.0-cp39-cp39-win32.whl", hash = "sha256:46ed616d5fb42f98630ed70c3529541408166c22cdfd4540b88d5f21006b0eff"}, + {file = "wrapt-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:eef4d64c650f33347c1f9266fa5ae001440b232ad9b98f1f43dfe7a79435c0a6"}, + {file = "wrapt-1.15.0-py3-none-any.whl", hash = "sha256:64b1df0f83706b4ef4cfb4fb0e4c2669100fd7ecacfb59e091fad300d4e04640"}, + {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, ] -itsdangerous = [ - {file = "itsdangerous-2.1.2-py3-none-any.whl", hash = "sha256:2c2349112351b88699d8d4b6b075022c0808887cb7ad10069318a8b0bc88db44"}, - {file = "itsdangerous-2.1.2.tar.gz", hash = "sha256:5dbbc68b317e5e42f327f9021763545dc3fc3bfe22e6deb96aaf1fc38874156a"}, + +[[package]] +name = "zipp" +version = "3.15.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, ] -jinja2 = [ - {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, - {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] + +[[package]] +name = "zope-event" +version = "4.6" +description = "Very basic event publishing system" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "zope.event-4.6-py2.py3-none-any.whl", hash = "sha256:73d9e3ef750cca14816a9c322c7250b0d7c9dbc337df5d1b807ff8d3d0b9e97c"}, + {file = "zope.event-4.6.tar.gz", hash = "sha256:81d98813046fc86cc4136e3698fee628a3282f9c320db18658c21749235fce80"}, ] -markupsafe = [ - {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:665a36ae6f8f20a4676b53224e33d456a6f5a72657d9c83c2aa00765072f31f7"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:340bea174e9761308703ae988e982005aedf427de816d1afe98147668cc03036"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:22152d00bf4a9c7c83960521fc558f55a1adbc0631fbb00a9471e097b19d72e1"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:28057e985dace2f478e042eaa15606c7efccb700797660629da387eb289b9323"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca244fa73f50a800cf8c3ebf7fd93149ec37f5cb9596aa8873ae2c1d23498601"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d9d971ec1e79906046aa3ca266de79eac42f1dbf3612a05dc9368125952bd1a1"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7e007132af78ea9df29495dbf7b5824cb71648d7133cf7848a2a5dd00d36f9ff"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:7313ce6a199651c4ed9d7e4cfb4aa56fe923b1adf9af3b420ee14e6d9a73df65"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-win32.whl", hash = "sha256:c4a549890a45f57f1ebf99c067a4ad0cb423a05544accaf2b065246827ed9603"}, - {file = "MarkupSafe-2.1.2-cp310-cp310-win_amd64.whl", hash = "sha256:835fb5e38fd89328e9c81067fd642b3593c33e1e17e2fdbf77f5676abb14a156"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:2ec4f2d48ae59bbb9d1f9d7efb9236ab81429a764dedca114f5fdabbc3788013"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:608e7073dfa9e38a85d38474c082d4281f4ce276ac0010224eaba11e929dd53a"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:65608c35bfb8a76763f37036547f7adfd09270fbdbf96608be2bead319728fcd"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2bfb563d0211ce16b63c7cb9395d2c682a23187f54c3d79bfec33e6705473c6"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:da25303d91526aac3672ee6d49a2f3db2d9502a4a60b55519feb1a4c7714e07d"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9cad97ab29dfc3f0249b483412c85c8ef4766d96cdf9dcf5a1e3caa3f3661cf1"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:085fd3201e7b12809f9e6e9bc1e5c96a368c8523fad5afb02afe3c051ae4afcc"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1bea30e9bf331f3fef67e0a3877b2288593c98a21ccb2cf29b74c581a4eb3af0"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-win32.whl", hash = "sha256:7df70907e00c970c60b9ef2938d894a9381f38e6b9db73c5be35e59d92e06625"}, - {file = "MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl", hash = "sha256:e55e40ff0cc8cc5c07996915ad367fa47da6b3fc091fdadca7f5403239c5fec3"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a6e40afa7f45939ca356f348c8e23048e02cb109ced1eb8420961b2f40fb373a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cf877ab4ed6e302ec1d04952ca358b381a882fbd9d1b07cccbfd61783561f98a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:63ba06c9941e46fa389d389644e2d8225e0e3e5ebcc4ff1ea8506dce646f8c8a"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1cd098434e83e656abf198f103a8207a8187c0fc110306691a2e94a78d0abb2"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:55f44b440d491028addb3b88f72207d71eeebfb7b5dbf0643f7c023ae1fba619"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:a6f2fcca746e8d5910e18782f976489939d54a91f9411c32051b4aab2bd7c513"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:0b462104ba25f1ac006fdab8b6a01ebbfbce9ed37fd37fd4acd70c67c973e460"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-win32.whl", hash = "sha256:7668b52e102d0ed87cb082380a7e2e1e78737ddecdde129acadb0eccc5423859"}, - {file = "MarkupSafe-2.1.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6d6607f98fcf17e534162f0709aaad3ab7a96032723d8ac8750ffe17ae5a0666"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a806db027852538d2ad7555b203300173dd1b77ba116de92da9afbc3a3be3eed"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:a4abaec6ca3ad8660690236d11bfe28dfd707778e2442b45addd2f086d6ef094"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f03a532d7dee1bed20bc4884194a16160a2de9ffc6354b3878ec9682bb623c54"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4cf06cdc1dda95223e9d2d3c58d3b178aa5dacb35ee7e3bbac10e4e1faacb419"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:22731d79ed2eb25059ae3df1dfc9cb1546691cc41f4e3130fe6bfbc3ecbbecfa"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:f8ffb705ffcf5ddd0e80b65ddf7bed7ee4f5a441ea7d3419e861a12eaf41af58"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8db032bf0ce9022a8e41a22598eefc802314e81b879ae093f36ce9ddf39ab1ba"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2298c859cfc5463f1b64bd55cb3e602528db6fa0f3cfd568d3605c50678f8f03"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-win32.whl", hash = "sha256:50c42830a633fa0cf9e7d27664637532791bfc31c731a87b202d2d8ac40c3ea2"}, - {file = "MarkupSafe-2.1.2-cp38-cp38-win_amd64.whl", hash = "sha256:bb06feb762bade6bf3c8b844462274db0c76acc95c52abe8dbed28ae3d44a147"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:99625a92da8229df6d44335e6fcc558a5037dd0a760e11d84be2260e6f37002f"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8bca7e26c1dd751236cfb0c6c72d4ad61d986e9a41bbf76cb445f69488b2a2bd"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:40627dcf047dadb22cd25ea7ecfe9cbf3bbbad0482ee5920b582f3809c97654f"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40dfd3fefbef579ee058f139733ac336312663c6706d1163b82b3003fb1925c4"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:090376d812fb6ac5f171e5938e82e7f2d7adc2b629101cec0db8b267815c85e2"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2e7821bffe00aa6bd07a23913b7f4e01328c3d5cc0b40b36c0bd81d362faeb65"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c0a33bc9f02c2b17c3ea382f91b4db0e6cde90b63b296422a939886a7a80de1c"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:b8526c6d437855442cdd3d87eede9c425c4445ea011ca38d937db299382e6fa3"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-win32.whl", hash = "sha256:137678c63c977754abe9086a3ec011e8fd985ab90631145dfb9294ad09c102a7"}, - {file = "MarkupSafe-2.1.2-cp39-cp39-win_amd64.whl", hash = "sha256:0576fe974b40a400449768941d5d0858cc624e3249dfd1e0c33674e5c7ca7aed"}, - {file = "MarkupSafe-2.1.2.tar.gz", hash = "sha256:abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d"}, -] -werkzeug = [ - {file = "Werkzeug-2.3.4-py3-none-any.whl", hash = "sha256:48e5e61472fee0ddee27ebad085614ebedb7af41e88f687aaf881afb723a162f"}, - {file = "Werkzeug-2.3.4.tar.gz", hash = "sha256:1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76"}, + +[package.dependencies] +setuptools = "*" + +[package.extras] +docs = ["Sphinx"] +test = ["zope.testrunner"] + +[[package]] +name = "zope-interface" +version = "6.0" +description = "Interfaces for Python" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "zope.interface-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f299c020c6679cb389814a3b81200fe55d428012c5e76da7e722491f5d205990"}, + {file = "zope.interface-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ee4b43f35f5dc15e1fec55ccb53c130adb1d11e8ad8263d68b1284b66a04190d"}, + {file = "zope.interface-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a158846d0fca0a908c1afb281ddba88744d403f2550dc34405c3691769cdd85"}, + {file = "zope.interface-6.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f72f23bab1848edb7472309e9898603141644faec9fd57a823ea6b4d1c4c8995"}, + {file = "zope.interface-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48f4d38cf4b462e75fac78b6f11ad47b06b1c568eb59896db5b6ec1094eb467f"}, + {file = "zope.interface-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:87b690bbee9876163210fd3f500ee59f5803e4a6607d1b1238833b8885ebd410"}, + {file = "zope.interface-6.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f2363e5fd81afb650085c6686f2ee3706975c54f331b426800b53531191fdf28"}, + {file = "zope.interface-6.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af169ba897692e9cd984a81cb0f02e46dacdc07d6cf9fd5c91e81f8efaf93d52"}, + {file = "zope.interface-6.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fa90bac61c9dc3e1a563e5babb3fd2c0c1c80567e815442ddbe561eadc803b30"}, + {file = "zope.interface-6.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:89086c9d3490a0f265a3c4b794037a84541ff5ffa28bb9c24cc9f66566968464"}, + {file = "zope.interface-6.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:809fe3bf1a91393abc7e92d607976bbb8586512913a79f2bf7d7ec15bd8ea518"}, + {file = "zope.interface-6.0-cp311-cp311-win_amd64.whl", hash = "sha256:0ec9653825f837fbddc4e4b603d90269b501486c11800d7c761eee7ce46d1bbb"}, + {file = "zope.interface-6.0-cp37-cp37m-macosx_10_15_x86_64.whl", hash = "sha256:790c1d9d8f9c92819c31ea660cd43c3d5451df1df61e2e814a6f99cebb292788"}, + {file = "zope.interface-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b39b8711578dcfd45fc0140993403b8a81e879ec25d53189f3faa1f006087dca"}, + {file = "zope.interface-6.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:eba51599370c87088d8882ab74f637de0c4f04a6d08a312dce49368ba9ed5c2a"}, + {file = "zope.interface-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ee934f023f875ec2cfd2b05a937bd817efcc6c4c3f55c5778cbf78e58362ddc"}, + {file = "zope.interface-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:042f2381118b093714081fd82c98e3b189b68db38ee7d35b63c327c470ef8373"}, + {file = "zope.interface-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:dfbbbf0809a3606046a41f8561c3eada9db811be94138f42d9135a5c47e75f6f"}, + {file = "zope.interface-6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:424d23b97fa1542d7be882eae0c0fc3d6827784105264a8169a26ce16db260d8"}, + {file = "zope.interface-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e538f2d4a6ffb6edfb303ce70ae7e88629ac6e5581870e66c306d9ad7b564a58"}, + {file = "zope.interface-6.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:12175ca6b4db7621aedd7c30aa7cfa0a2d65ea3a0105393e05482d7a2d367446"}, + {file = "zope.interface-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4c3d7dfd897a588ec27e391edbe3dd320a03684457470415870254e714126b1f"}, + {file = "zope.interface-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b3f543ae9d3408549a9900720f18c0194ac0fe810cecda2a584fd4dca2eb3bb8"}, + {file = "zope.interface-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d0583b75f2e70ec93f100931660328965bb9ff65ae54695fb3fa0a1255daa6f2"}, + {file = "zope.interface-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:23ac41d52fd15dd8be77e3257bc51bbb82469cf7f5e9a30b75e903e21439d16c"}, + {file = "zope.interface-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99856d6c98a326abbcc2363827e16bd6044f70f2ef42f453c0bd5440c4ce24e5"}, + {file = "zope.interface-6.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1592f68ae11e557b9ff2bc96ac8fc30b187e77c45a3c9cd876e3368c53dc5ba8"}, + {file = "zope.interface-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4407b1435572e3e1610797c9203ad2753666c62883b921318c5403fb7139dec2"}, + {file = "zope.interface-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:5171eb073474a5038321409a630904fd61f12dd1856dd7e9d19cd6fe092cbbc5"}, + {file = "zope.interface-6.0.tar.gz", hash = "sha256:aab584725afd10c710b8f1e6e208dbee2d0ad009f57d674cb9d1b3964037275d"}, ] + +[package.dependencies] +setuptools = "*" + +[package.extras] +docs = ["Sphinx", "repoze.sphinx.autointerface"] +test = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] +testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] + +[metadata] +lock-version = "2.0" +python-versions = "^3.10" +content-hash = "0b80de081ade5866efad3d74a01672c12ba209ab38a96b4cc25d51242d05f1b6" diff --git a/uptrace/pyproject.toml b/uptrace/pyproject.toml index 35a5dd6..0621d44 100644 --- a/uptrace/pyproject.toml +++ b/uptrace/pyproject.toml @@ -8,6 +8,13 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.10" flask = "2.2.3" +opentelemetry-exporter-otlp = "^1.18.0" +opentelemetry-distro = "^0.39b0" +opentelemetry-exporter-otlp-proto-grpc = "^1.18.0" +opentelemetry-exporter-otlp-proto-http = "^1.18.0" +opentelemetry-instrumentation-flask = "^0.39b0" +uwsgi = "^2.0.21" +gevent = "^22.10.2" From 8f93719b93cd216ead2761500850bc61015bb926 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Thu, 22 Jun 2023 16:48:41 +0800 Subject: [PATCH 10/17] Add uwsgi --- uptrace/config/uwsgi.ini | 14 ++++++++++++++ uptrace/docker-compose.yaml | 35 +++++++++++++++-------------------- 2 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 uptrace/config/uwsgi.ini diff --git a/uptrace/config/uwsgi.ini b/uptrace/config/uwsgi.ini new file mode 100644 index 0000000..63d450c --- /dev/null +++ b/uptrace/config/uwsgi.ini @@ -0,0 +1,14 @@ +[uwsgi] +module = app:app +master = true +die-on-term = true +post-buffering = true +reload-mercy = 30 +worker-reload-mercy = 15 +need-app = true +strict = true +hook-master-start = unix_signal:15 gracefully_kill_them_all +hook-master-start = unix_signal:2 gracefully_kill_them_all +hook-master-start = unix_signal:3 gracefully_kill_them_all +disable-write-exception = true +cache2 = name=inmemory,maxitems=500,bitmap=1 diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 37c60a2..869b7d7 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -4,16 +4,22 @@ services: web: build: . # image: a901002666/opentelemetry:ubutu-python3.10 - # command: sleep 1000 - command : > - opentelemetry-instrument - --traces_exporter console - --metrics_exporter console,otlp - --logs_exporter console - --service_name nino-flask-cli - --exporter_otlp_endpoint http://otelcol:4317 - flask run --host 0.0.0.0 -p 8001 --reload + # command : > + # opentelemetry-instrument + # --traces_exporter console,otlp + # --metrics_exporter console,otlp + # --logs_exporter console + # --service_name nino-flask-cli + # --exporter_otlp_endpoint http://otelcol:4317 + # flask run --host 0.0.0.0 -p 8001 --reload # command: flask run --host 0.0.0.0 -p 8001 --reload + command: > + uwsgi + --single-interpreter + --enable-threads + --ini config/uwsgi.ini + --gevent 100 + --http 0.0.0.0:8001 environment: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt # env_file: @@ -87,17 +93,6 @@ services: - 4318:4318 - 8888:8888 - # mailhog: - # image: mailhog/mailhog:v1.0.1 - # restart: on-failure - # ports: - # - '8025:8025' - - # vector: - # image: timberio/vector:0.28.X-alpine - # volumes: - # - ./vector.toml:/etc/vector/vector.toml:ro - volumes: ch_data7: pg_data4: From 438787a81c511b59a0d3bae354644bec95dd487e Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Thu, 22 Jun 2023 18:17:24 +0800 Subject: [PATCH 11/17] Add mongo otel --- uptrace/app.py | 52 +++- uptrace/docker-compose.yaml | 25 +- uptrace/poetry.lock | 473 +++++++++++++++++++++++++++++++++++- uptrace/pyproject.toml | 4 + 4 files changed, 541 insertions(+), 13 deletions(-) diff --git a/uptrace/app.py b/uptrace/app.py index 4feb140..90deb88 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -1,8 +1,10 @@ import os import time - import grpc + +from opentelemetry.instrumentation.pymongo import PymongoInstrumentor + from opentelemetry import trace, metrics from opentelemetry.sdk import metrics as sdkmetrics from opentelemetry.sdk.resources import Resource @@ -23,7 +25,8 @@ from opentelemetry.instrumentation.flask import FlaskInstrumentor from random import randint -from flask import Flask +from flask import Flask, request, Response, make_response +from flask_mongoengine import MongoEngine resource = Resource( attributes={"service.name": "myservice", "service.version": "1.0.0"} @@ -77,13 +80,54 @@ app = Flask(__name__) +app.config['MONGODB_SETTINGS'] = { + 'host': 'mongodb://mongo/dev' +} +# NOTE: Need to call instrument before mongoengine initialize. +PymongoInstrumentor().instrument() +db = MongoEngine(app) FlaskInstrumentor().instrument_app(app) -@app.route("/rolldice2") + +class User(db.Document): + username = db.StringField(required=True) + + +@app.route('/user', methods={'POST'}, endpoint='create_user') +def create_user(): + payload = request.get_json() + + if not (username := payload.get('username')): + return Response(status=400) + + if user := User.objects.create(username=username): + response = make_response({ + 'id': str(user.id), + 'username': user.username + }) + response.status = 201 + return response + + +@app.route('/user/', methods={'GET'}, endpoint='get_user_by_id') +def get_user_by_id(user_id: str): + + if not (user := User.objects.filter(id=user_id).first()): + return Response(status=404) + + + response = make_response({ + 'id': str(user.id), + 'username': user.username + }) + return response + + +@app.route("/roll") def toll_dice2(): return str(randint(1, 6)) -@app.route("/rolldice") +@app.route("/roll-long") def roll_dice(): counter.add(1) rolled = randint(1, 6) diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 869b7d7..14a239e 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -12,14 +12,14 @@ services: # --service_name nino-flask-cli # --exporter_otlp_endpoint http://otelcol:4317 # flask run --host 0.0.0.0 -p 8001 --reload - # command: flask run --host 0.0.0.0 -p 8001 --reload - command: > - uwsgi - --single-interpreter - --enable-threads - --ini config/uwsgi.ini - --gevent 100 - --http 0.0.0.0:8001 + command: flask run --host 0.0.0.0 -p 8001 --reload + # command: > + # uwsgi + # --single-interpreter + # --enable-threads + # --ini config/uwsgi.ini + # --gevent 100 + # --http 0.0.0.0:8001 environment: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt # env_file: @@ -93,6 +93,15 @@ services: - 4318:4318 - 8888:8888 + mongo: + image: mongo + restart: always + volumes: + - mongo:/data/db + ports: + - 27017:27017 + volumes: ch_data7: pg_data4: + mongo: diff --git a/uptrace/poetry.lock b/uptrace/poetry.lock index 1150074..8db61da 100644 --- a/uptrace/poetry.lock +++ b/uptrace/poetry.lock @@ -1,5 +1,20 @@ # This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand. +[[package]] +name = "amqp" +version = "5.1.1" +description = "Low-level AMQP client for Python (fork of amqplib)." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "amqp-5.1.1-py3-none-any.whl", hash = "sha256:6f0956d2c23d8fa6e7691934d8c3930eadb44972cbbd1a7ae3a520f735d43359"}, + {file = "amqp-5.1.1.tar.gz", hash = "sha256:2c1b13fecc0893e946c65cbd5f36427861cffa4ea2201d8f6fca22e2a373b5e2"}, +] + +[package.dependencies] +vine = ">=5.0.0" + [[package]] name = "backoff" version = "2.2.1" @@ -12,6 +27,74 @@ files = [ {file = "backoff-2.2.1.tar.gz", hash = "sha256:03f829f5bb1923180821643f8753b0502c3b682293992485b0eef2807afa5cba"}, ] +[[package]] +name = "billiard" +version = "4.1.0" +description = "Python multiprocessing fork with improvements and bugfixes" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "billiard-4.1.0-py3-none-any.whl", hash = "sha256:0f50d6be051c6b2b75bfbc8bfd85af195c5739c281d3f5b86a5640c65563614a"}, + {file = "billiard-4.1.0.tar.gz", hash = "sha256:1ad2eeae8e28053d729ba3373d34d9d6e210f6e4d8bf0a9c64f92bd053f1edf5"}, +] + +[[package]] +name = "celery" +version = "5.3.1" +description = "Distributed Task Queue." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "celery-5.3.1-py3-none-any.whl", hash = "sha256:27f8f3f3b58de6e0ab4f174791383bbd7445aff0471a43e99cfd77727940753f"}, + {file = "celery-5.3.1.tar.gz", hash = "sha256:f84d1c21a1520c116c2b7d26593926581191435a03aa74b77c941b93ca1c6210"}, +] + +[package.dependencies] +billiard = ">=4.1.0,<5.0" +click = ">=8.1.2,<9.0" +click-didyoumean = ">=0.3.0" +click-plugins = ">=1.1.1" +click-repl = ">=0.2.0" +kombu = ">=5.3.1,<6.0" +python-dateutil = ">=2.8.2" +tzdata = ">=2022.7" +vine = ">=5.0.0,<6.0" + +[package.extras] +arangodb = ["pyArango (>=2.0.1)"] +auth = ["cryptography (==41.0.1)"] +azureblockblob = ["azure-storage-blob (>=12.15.0)"] +brotli = ["brotli (>=1.0.0)", "brotlipy (>=0.7.0)"] +cassandra = ["cassandra-driver (>=3.25.0,<4)"] +consul = ["python-consul2 (==0.1.5)"] +cosmosdbsql = ["pydocumentdb (==2.3.5)"] +couchbase = ["couchbase (>=3.0.0)"] +couchdb = ["pycouchdb (==1.14.2)"] +django = ["Django (>=2.2.28)"] +dynamodb = ["boto3 (>=1.26.143)"] +elasticsearch = ["elasticsearch (<8.0)"] +eventlet = ["eventlet (>=0.32.0)"] +gevent = ["gevent (>=1.5.0)"] +librabbitmq = ["librabbitmq (>=2.0.0)"] +memcache = ["pylibmc (==1.6.3)"] +mongodb = ["pymongo[srv] (>=4.0.2)"] +msgpack = ["msgpack (==1.0.5)"] +pymemcache = ["python-memcached (==1.59)"] +pyro = ["pyro4 (==4.82)"] +pytest = ["pytest-celery (==0.0.0)"] +redis = ["redis (>=4.5.2,!=4.5.5)"] +s3 = ["boto3 (>=1.26.143)"] +slmq = ["softlayer-messaging (>=1.0.3)"] +solar = ["ephem (==4.1.4)"] +sqlalchemy = ["sqlalchemy (>=1.4.48,<2.1)"] +sqs = ["boto3 (>=1.26.143)", "kombu[sqs] (>=5.3.0)", "pycurl (>=7.43.0.5)", "urllib3 (>=1.26.16)"] +tblib = ["tblib (>=1.3.0)", "tblib (>=1.5.0)"] +yaml = ["PyYAML (>=3.10)"] +zookeeper = ["kazoo (>=1.3.1)"] +zstd = ["zstandard (==0.21.0)"] + [[package]] name = "certifi" version = "2023.5.7" @@ -201,6 +284,58 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "click-didyoumean" +version = "0.3.0" +description = "Enables git-like *did-you-mean* feature in click" +category = "main" +optional = false +python-versions = ">=3.6.2,<4.0.0" +files = [ + {file = "click-didyoumean-0.3.0.tar.gz", hash = "sha256:f184f0d851d96b6d29297354ed981b7dd71df7ff500d82fa6d11f0856bee8035"}, + {file = "click_didyoumean-0.3.0-py3-none-any.whl", hash = "sha256:a0713dc7a1de3f06bc0df5a9567ad19ead2d3d5689b434768a6145bff77c0667"}, +] + +[package.dependencies] +click = ">=7" + +[[package]] +name = "click-plugins" +version = "1.1.1" +description = "An extension module for click to enable registering CLI commands via setuptools entry-points." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "click-plugins-1.1.1.tar.gz", hash = "sha256:46ab999744a9d831159c3411bb0c79346d94a444df9a3a3742e9ed63645f264b"}, + {file = "click_plugins-1.1.1-py2.py3-none-any.whl", hash = "sha256:5d262006d3222f5057fd81e1623d4443e41dcda5dc815c06b442aa3c02889fc8"}, +] + +[package.dependencies] +click = ">=4.0" + +[package.extras] +dev = ["coveralls", "pytest (>=3.6)", "pytest-cov", "wheel"] + +[[package]] +name = "click-repl" +version = "0.3.0" +description = "REPL plugin for Click" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "click-repl-0.3.0.tar.gz", hash = "sha256:17849c23dba3d667247dc4defe1757fff98694e90fe37474f3feebb69ced26a9"}, + {file = "click_repl-0.3.0-py3-none-any.whl", hash = "sha256:fb7e06deb8da8de86180a33a9da97ac316751c094c6899382da7feeeeb51b812"}, +] + +[package.dependencies] +click = ">=7.0" +prompt-toolkit = ">=3.0.36" + +[package.extras] +testing = ["pytest (>=7.2.1)", "pytest-cov (>=4.0.0)", "tox (>=4.4.3)"] + [[package]] name = "colorama" version = "0.4.6" @@ -231,6 +366,43 @@ wrapt = ">=1.10,<2" [package.extras] dev = ["PyTest", "PyTest-Cov", "bump2version (<1)", "sphinx (<2)", "tox"] +[[package]] +name = "dnspython" +version = "2.3.0" +description = "DNS toolkit" +category = "main" +optional = false +python-versions = ">=3.7,<4.0" +files = [ + {file = "dnspython-2.3.0-py3-none-any.whl", hash = "sha256:89141536394f909066cabd112e3e1a37e4e654db00a25308b0f130bc3152eb46"}, + {file = "dnspython-2.3.0.tar.gz", hash = "sha256:224e32b03eb46be70e12ef6d64e0be123a64e621ab4c0822ff6d450d52a540b9"}, +] + +[package.extras] +curio = ["curio (>=1.2,<2.0)", "sniffio (>=1.1,<2.0)"] +dnssec = ["cryptography (>=2.6,<40.0)"] +doh = ["h2 (>=4.1.0)", "httpx (>=0.21.1)", "requests (>=2.23.0,<3.0.0)", "requests-toolbelt (>=0.9.1,<0.11.0)"] +doq = ["aioquic (>=0.9.20)"] +idna = ["idna (>=2.1,<4.0)"] +trio = ["trio (>=0.14,<0.23)"] +wmi = ["wmi (>=1.5.1,<2.0.0)"] + +[[package]] +name = "email-validator" +version = "2.0.0.post2" +description = "A robust email address syntax and deliverability validation library." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "email_validator-2.0.0.post2-py3-none-any.whl", hash = "sha256:2466ba57cda361fb7309fd3d5a225723c788ca4bbad32a0ebd5373b99730285c"}, + {file = "email_validator-2.0.0.post2.tar.gz", hash = "sha256:1ff6e86044200c56ae23595695c54e9614f4a9551e0e393614f764860b3d7900"}, +] + +[package.dependencies] +dnspython = ">=2.0.0" +idna = ">=2.0.0" + [[package]] name = "flask" version = "2.2.3" @@ -253,6 +425,44 @@ Werkzeug = ">=2.2.2" async = ["asgiref (>=3.2)"] dotenv = ["python-dotenv"] +[[package]] +name = "flask-mongoengine" +version = "1.0.0" +description = "Flask-MongoEngine is a Flask extension that provides integration with MongoEngine and WTF model forms." +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "flask-mongoengine-1.0.0.tar.gz", hash = "sha256:ce68726d2be8d88006e88f17e4be3b7ad07c79ca8dedb60653d3dab5d9485840"}, + {file = "flask_mongoengine-1.0.0-py3-none-any.whl", hash = "sha256:2db13140ce7f61a935e75268190450d5ecc9b60a7310fd289f9511835aa105d4"}, +] + +[package.dependencies] +Flask = ">=1.1.2" +Flask-WTF = ">=0.14.3" +mongoengine = ">=0.20" +WTForms = {version = ">=2.3.1", extras = ["email"]} + +[[package]] +name = "flask-wtf" +version = "1.1.1" +description = "Form rendering, validation, and CSRF protection for Flask with WTForms." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "Flask-WTF-1.1.1.tar.gz", hash = "sha256:41c4244e9ae626d63bed42ae4785b90667b885b1535d5a4095e1f63060d12aa9"}, + {file = "Flask_WTF-1.1.1-py3-none-any.whl", hash = "sha256:7887d6f1ebb3e17bf648647422f0944c9a469d0fcf63e3b66fb9a83037e38b2c"}, +] + +[package.dependencies] +Flask = "*" +itsdangerous = "*" +WTForms = "*" + +[package.extras] +email = ["email-validator"] + [[package]] name = "gevent" version = "22.10.2" @@ -541,6 +751,39 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "kombu" +version = "5.3.1" +description = "Messaging library for Python." +category = "main" +optional = false +python-versions = ">=3.8" +files = [ + {file = "kombu-5.3.1-py3-none-any.whl", hash = "sha256:48ee589e8833126fd01ceaa08f8a2041334e9f5894e5763c8486a550454551e9"}, + {file = "kombu-5.3.1.tar.gz", hash = "sha256:fbd7572d92c0bf71c112a6b45163153dea5a7b6a701ec16b568c27d0fd2370f2"}, +] + +[package.dependencies] +amqp = ">=5.1.1,<6.0.0" +vine = "*" + +[package.extras] +azureservicebus = ["azure-servicebus (>=7.10.0)"] +azurestoragequeues = ["azure-identity (>=1.12.0)", "azure-storage-queue (>=12.6.0)"] +confluentkafka = ["confluent-kafka (==2.1.1)"] +consul = ["python-consul2"] +librabbitmq = ["librabbitmq (>=2.0.0)"] +mongodb = ["pymongo (>=4.1.1)"] +msgpack = ["msgpack"] +pyro = ["pyro4"] +qpid = ["qpid-python (>=0.26)", "qpid-tools (>=0.26)"] +redis = ["redis (>=4.5.2)"] +slmq = ["softlayer-messaging (>=1.0.3)"] +sqlalchemy = ["sqlalchemy (>=1.4.48,<2.1)"] +sqs = ["boto3 (>=1.26.143)", "pycurl (>=7.43.0.5)", "urllib3 (>=1.26.16)"] +yaml = ["PyYAML (>=3.10)"] +zookeeper = ["kazoo (>=2.8.0)"] + [[package]] name = "markupsafe" version = "2.1.3" @@ -601,6 +844,21 @@ files = [ {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, ] +[[package]] +name = "mongoengine" +version = "0.27.0" +description = "MongoEngine is a Python Object-Document Mapper for working with MongoDB." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mongoengine-0.27.0-py3-none-any.whl", hash = "sha256:c3523b8f886052f3deb200b3218bcc13e4b781661e3bea38587cc936c80ea358"}, + {file = "mongoengine-0.27.0.tar.gz", hash = "sha256:8f38df7834dc4b192d89f2668dcf3091748d12f74d55648ce77b919167a4a49b"}, +] + +[package.dependencies] +pymongo = ">=3.4,<5.0" + [[package]] name = "opentelemetry-api" version = "1.18.0" @@ -759,6 +1017,27 @@ opentelemetry-util-http = "0.39b0" instruments = ["flask (>=1.0,<3.0)"] test = ["markupsafe (==2.0.1)", "opentelemetry-instrumentation-flask[instruments]", "opentelemetry-test-utils (==0.39b0)"] +[[package]] +name = "opentelemetry-instrumentation-pymongo" +version = "0.39b0" +description = "OpenTelemetry pymongo instrumentation" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_pymongo-0.39b0-py3-none-any.whl", hash = "sha256:d9df08f7c7b2293c230d3f583301f56200de375b709b09d2d5e2d78aa0aac64d"}, + {file = "opentelemetry_instrumentation_pymongo-0.39b0.tar.gz", hash = "sha256:b5b29c1a3611f586082d900d831ad116627070aaa9dfc48e2c492823f9138044"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" + +[package.extras] +instruments = ["pymongo (>=3.1,<5.0)"] +test = ["opentelemetry-instrumentation-pymongo[instruments]", "opentelemetry-test-utils (==0.39b0)"] + [[package]] name = "opentelemetry-instrumentation-wsgi" version = "0.39b0" @@ -837,6 +1116,21 @@ files = [ {file = "opentelemetry_util_http-0.39b0.tar.gz", hash = "sha256:1a78e53e97c8f0b05216dbe4d93836ae5f5f94ba877003e56d065f089373f0ce"}, ] +[[package]] +name = "prompt-toolkit" +version = "3.0.38" +description = "Library for building powerful interactive command lines in Python" +category = "main" +optional = false +python-versions = ">=3.7.0" +files = [ + {file = "prompt_toolkit-3.0.38-py3-none-any.whl", hash = "sha256:45ea77a2f7c60418850331366c81cf6b5b9cf4c7fd34616f733c5427e6abbb1f"}, + {file = "prompt_toolkit-3.0.38.tar.gz", hash = "sha256:23ac5d50538a9a38c8bde05fecb47d0b403ecd0662857a86f886f798563d5b9b"}, +] + +[package.dependencies] +wcwidth = "*" + [[package]] name = "protobuf" version = "4.23.3" @@ -872,6 +1166,116 @@ files = [ {file = "pycparser-2.21.tar.gz", hash = "sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206"}, ] +[[package]] +name = "pymongo" +version = "4.4.0" +description = "Python driver for MongoDB " +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "pymongo-4.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:50294bae0f20ec4f8d3f5eefd133956f582942c156d08f6b88f2a1b1efe04c53"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux1_i686.whl", hash = "sha256:88ceab5cd84f7d86f018fa66377d6f90fcf3643d56283f2f4124ccef58390a0e"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux2014_aarch64.whl", hash = "sha256:2578f077b9448b7a420b3e9b0efdfb7ecdb2a3c27e00c181610809717c900cd9"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux2014_i686.whl", hash = "sha256:ebe1954aa85e622674ea01828419f129527c95c40a392e0f7761e242d85a772f"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux2014_ppc64le.whl", hash = "sha256:7e0fbf05bb74a3f610f970a178bfb4e048f6b82fc22dda5e14e0ddfc4d66c9b7"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux2014_s390x.whl", hash = "sha256:4b43ae6e1c4b972761065f77f3eff4b914154bc5bd74d632305875c5309eafd1"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux2014_x86_64.whl", hash = "sha256:18acb807de39eb9b8ff7122094920f1da79c1781dc96cfef73dd97da51448f7b"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc5c56169effa5bf9fae5e9a66efc211b3f252869d99d6c400792eced7f213b9"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1c6bd8470c89b2cd6312fa685dbf4c64371a04a7e4a3a55e2007626f8f997103"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:02f535bc8f8d75d45ec6cd944804d466a73a46afc368d6c36e232b887edd0475"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff281a66925790a05e3c7e0de1350a0992b66a4e51724317ac35026ac856ae28"}, + {file = "pymongo-4.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6aa18b255af46641d167378f8b8f06becb6eb1670f622aefa34e502362267fa9"}, + {file = "pymongo-4.4.0-cp310-cp310-win32.whl", hash = "sha256:34ea6ffb77f0cf8d01c4c1df60dc68141859ada1507c326380ef81e23b58c9cc"}, + {file = "pymongo-4.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:071c256fbb35c6942970b8b6eb6b89bac302db49a2d6d35e68c35b442a0ce710"}, + {file = "pymongo-4.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:d0a8f16a97758ca9af1baa927521b24175dba7e95ce745d5bf64a5c75fe61df8"}, + {file = "pymongo-4.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:02060ced24a26e1c73b6f491b728fe99e73f38ba3a1e4b882dc7b873d419ab3e"}, + {file = "pymongo-4.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38ece8d2892de19fa437bc4f60b0d8c5353b185e8cc1c543212a488c93c74834"}, + {file = "pymongo-4.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2128592140426044d59a89f30b7aba1e185faf2553b3d161dcca0aa970ba40c7"}, + {file = "pymongo-4.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8d482e2ae01a5ac17183afe8c808cb6919889bdf22f0d3663105ccf0ea89adf"}, + {file = "pymongo-4.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0ddb34591f5e19296ef5b643e23ec5179a7c1d2b73c17701f50dcfa493e0252"}, + {file = "pymongo-4.4.0-cp311-cp311-win32.whl", hash = "sha256:23bfd793be088470a1c7bca5c907ae3180e6a4cf731e96a194c89413c042cf4c"}, + {file = "pymongo-4.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:48908eaca3dccc2af8b4eae73ee00d2e1e7ffe91ce630c8906981c075161ad8c"}, + {file = "pymongo-4.4.0-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:a4315509a4e155e6bd4b199bd435ff2bb31f558915726e0c50a725ae7b99727f"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:93d8d5ee37cd9634747a1363496fd3949451bdaeb9539278985cb6fd08d929cf"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:3e6efcf768209dc4d966fabbbe4dcd2dd2d60ec4d8342668da02664f0c73a9e8"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:e5f19bb887d83959ba1c359fba16cdedb0f868ba85ae375c3e4e0fdf5697a524"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:b641683de9bf05b4b52a629bf8ddd5fa0fb061ca54bc2412ce89ce2de2beda36"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux2014_ppc64le.whl", hash = "sha256:2f74b606c11c570ec2a6c384fc194d96f00eaa829c7c08cbec455f7b02d28774"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:242d1a30162ead28e69df37748021039c4b292bbfd7c5449294a26c8365d342d"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:4b092e2a11f37a41e1767a221ff2719397ae2e033f978de236ce10c4b1916227"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c96a080cae86c1c27758fdd3fbee0298a006b05272de4dff9dea21ca34952c72"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:67aa85bbab597615efd83f521c8da34dd9a19b7456cc919c227378c793073183"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1eea8af506b8b33573c76942a5c2390f2cddb4e195b1cdfc373ca919e9b95904"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:44893b6788da1d67696ff2f27e42e315d40965a4fa23786dcc26c932c5b02149"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01807a3d0b758cbf65e7b3af84a24d2ee58c9d6c0af8b0af99b581bcaa75a931"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9f3e8fc3433a86ab0b3d960f8fb48fe7135876df04987dd04b3bf35d9b49ae92"}, + {file = "pymongo-4.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:0669823de06c3a77fddf738f6250688b7fdae2b44edbe3c103b7fbfdfc848392"}, + {file = "pymongo-4.4.0-cp37-cp37m-win32.whl", hash = "sha256:95a5036b7046f617207f38936c188eeb56dbe740cba0fa1215df2e1b9ee38c74"}, + {file = "pymongo-4.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:45838fa9abf3bce35a24fffcd289de23f3d6edc4cc9beac28037df3e1009f892"}, + {file = "pymongo-4.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:40ad38ad6f6dbd8a9dbd05195a15fe7749a0692dc895274a4f806d9831fceb3c"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux1_i686.whl", hash = "sha256:028addb304bc525d4a10c5c6e59ef5f140e528ae285c10e1d43f19905631e32f"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:093c5343c5863e87023318050507511fa7458b0376caabcc41abff0e36aaabc8"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:1a1bb096579ffa59143a8d8fc9d4692db3e04305cf5a0e48e0724ae47a836255"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:b100895d6b57d6a7e8de5fd15578aaa46170b56d978baf56182c10e8ba725fbf"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux2014_ppc64le.whl", hash = "sha256:29956f61ab885c28b190ff817de7ad0c75a470699632b44848b102640fbf9e73"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:f38bbab4d13d180ed00c2f107e36503bd2e2cc4c6d4ae2734c0a85c2edaf2d2e"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:274eb75231aca12d54d421852fc230e8655e4b33b30e9eb7fd34269955e125dd"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b6603315f9a15e5ed80143a5a744c695a8503e27a76fb5828f7269225f39ddd"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d368def4564681f681f4fe1ae906239bb4dc7dd403c49d15d3a6fe2688950f13"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bf4e83af0bd3cf4c98eaf1ed2d028afd520bdffd6f7570f6cc5a44e9363fbb9a"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4eba5abcee347bdaa7f1a3f18fd97758f0b75a6dc5704885e793aeb51e8e5e32"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a2e496753e91bc82dfbe1f3bab21e0907866dab3c810e255ebaf991cd5c5455d"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8edb59aa5c10a3fb8d3a0c2cac8ba58c0d8f4e56f9003378ac1fff503a8d3f42"}, + {file = "pymongo-4.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:801094c80d117b0d476f0afbe16cdfe438cc4069c5b0f2578564cb4b3c83f80f"}, + {file = "pymongo-4.4.0-cp38-cp38-win32.whl", hash = "sha256:8fd68b540fb70954deeb2b6a1fb2f34d6342bcf221e003e6063e3b28e87b2778"}, + {file = "pymongo-4.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:a5551491ace0f05ae0bbe5a496c4daf216d9fc98e182940f471c228235b1626e"}, + {file = "pymongo-4.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:4481f2796d53cd0c74d988a23a11266e6cae03be3878f42ed2c221b192d14f8d"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux1_i686.whl", hash = "sha256:6a2564ed1a07258a73f7adfb0663aa69022f1edc431d11aae4a32a29e7755d3c"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:900c773d4f9d68747bb19ef40c35c701f4a919a6b96efa2d4e1cb50074a9738e"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b213fae58d6ba14ac71a481691981e582ff5813630f3a82aaf92fb79399ba0ec"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux2014_i686.whl", hash = "sha256:4a0cfab6b6c1826e8dfe4453c08aa70343a693dede7c09dca564a9b1f2393374"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux2014_ppc64le.whl", hash = "sha256:8d8a8aef8724058d416536902e680f2b06499e58c54220becdfcd3ff8e5dccfd"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:6acedf0778b79b6ea111a28fb23760b5f6b7b1c3e1f1e3595cf87ce709bce344"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:15cf004b6329da48078d7d9d1c79c802df6631b94e5a1ed9a112d713cc0f66e9"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2caac57d2a0160dce877e706e94e8a15b87feb71c257ecb8b5a039f7e98ba99b"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a2875f0bdb605e56630f46e12082f26ac2c680a5473f5f154b7131841727948c"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:78be52dc21f578a17e2c1cf1a222d4e64e91e0b1dba7e18f5ff7be7c0bf8053f"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7eb221dcb9e27415d2bd6e2d3001d1da0f351e2aa1564f6f3987f2206c066600"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b3eed06a24157a891eac5f73ec2400d22cccc95cde78a3f0e2b90c5ab17f1cf1"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:196c2c9ffccdf0ad4efdfae29347c4e2ae52c3415e958736cda84e4062553e96"}, + {file = "pymongo-4.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:4b65f4e66efe43dcc5fb3a285f899e798742b8365bafdd832054675d34d640d5"}, + {file = "pymongo-4.4.0-cp39-cp39-win32.whl", hash = "sha256:4a28ad09abccc9f71632398febfea12d3f28cec7e44fe6f2b16665807e62c298"}, + {file = "pymongo-4.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:5e13ba36f18489600db28da13da73e8e190bd48899ad268cb482fe726d31a922"}, + {file = "pymongo-4.4.0.tar.gz", hash = "sha256:a1b5d286fee4b9b5a0312faede02f2ce2f56ac695685af1d25f428abdac9a22c"}, +] + +[package.dependencies] +dnspython = ">=1.16.0,<3.0.0" + +[package.extras] +aws = ["pymongo-auth-aws (<2.0.0)"] +encryption = ["pymongo[aws]", "pymongocrypt (>=1.6.0,<2.0.0)"] +gssapi = ["pykerberos", "winkerberos (>=0.5.0)"] +ocsp = ["certifi", "pyopenssl (>=17.2.0)", "requests (<3.0.0)", "service-identity (>=18.1.0)"] +snappy = ["python-snappy"] +zstd = ["zstandard"] + +[[package]] +name = "python-dateutil" +version = "2.8.2" +description = "Extensions to the standard Python datetime module" +category = "main" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +files = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] + +[package.dependencies] +six = ">=1.5" + [[package]] name = "requests" version = "2.31.0" @@ -911,6 +1315,18 @@ docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "pygments-g testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pip-run (>=8.8)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +[[package]] +name = "six" +version = "1.16.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, +] + [[package]] name = "typing-extensions" version = "4.6.3" @@ -923,6 +1339,18 @@ files = [ {file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"}, ] +[[package]] +name = "tzdata" +version = "2023.3" +description = "Provider of IANA time zone data" +category = "main" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2023.3-py2.py3-none-any.whl", hash = "sha256:7e65763eef3120314099b6939b5546db7adce1e7d6f2e179e3df563c70511eda"}, + {file = "tzdata-2023.3.tar.gz", hash = "sha256:11ef1e08e54acb0d4f95bdb1be05da659673de4acbd21bf9c69e94cc5e907a3a"}, +] + [[package]] name = "urllib3" version = "2.0.3" @@ -952,6 +1380,30 @@ files = [ {file = "uwsgi-2.0.21.tar.gz", hash = "sha256:35a30d83791329429bc04fe44183ce4ab512fcf6968070a7bfba42fc5a0552a9"}, ] +[[package]] +name = "vine" +version = "5.0.0" +description = "Promises, promises, promises." +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "vine-5.0.0-py2.py3-none-any.whl", hash = "sha256:4c9dceab6f76ed92105027c49c823800dd33cacce13bdedc5b914e3514b7fb30"}, + {file = "vine-5.0.0.tar.gz", hash = "sha256:7d3b1624a953da82ef63462013bbd271d3eb75751489f9807598e8f340bd637e"}, +] + +[[package]] +name = "wcwidth" +version = "0.2.6" +description = "Measures the displayed width of unicode strings in a terminal" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "wcwidth-0.2.6-py2.py3-none-any.whl", hash = "sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e"}, + {file = "wcwidth-0.2.6.tar.gz", hash = "sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0"}, +] + [[package]] name = "werkzeug" version = "2.3.6" @@ -1055,6 +1507,25 @@ files = [ {file = "wrapt-1.15.0.tar.gz", hash = "sha256:d06730c6aed78cee4126234cf2d071e01b44b915e725a6cb439a879ec9754a3a"}, ] +[[package]] +name = "wtforms" +version = "3.0.1" +description = "Form validation and rendering for Python web development." +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "WTForms-3.0.1-py3-none-any.whl", hash = "sha256:837f2f0e0ca79481b92884962b914eba4e72b7a2daaf1f939c890ed0124b834b"}, + {file = "WTForms-3.0.1.tar.gz", hash = "sha256:6b351bbb12dd58af57ffef05bc78425d08d1914e0fd68ee14143b7ade023c5bc"}, +] + +[package.dependencies] +email-validator = {version = "*", optional = true, markers = "extra == \"email\""} +MarkupSafe = "*" + +[package.extras] +email = ["email-validator"] + [[package]] name = "zipp" version = "3.15.0" @@ -1141,4 +1612,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "0b80de081ade5866efad3d74a01672c12ba209ab38a96b4cc25d51242d05f1b6" +content-hash = "275fc040c520705f2ae1cdb449ab4912fce8bb83d3e4076bfac844b246f4e940" diff --git a/uptrace/pyproject.toml b/uptrace/pyproject.toml index 0621d44..f02f016 100644 --- a/uptrace/pyproject.toml +++ b/uptrace/pyproject.toml @@ -15,6 +15,10 @@ opentelemetry-exporter-otlp-proto-http = "^1.18.0" opentelemetry-instrumentation-flask = "^0.39b0" uwsgi = "^2.0.21" gevent = "^22.10.2" +mongoengine = "^0.27.0" +celery = "^5.3.1" +flask-mongoengine = "^1.0.0" +opentelemetry-instrumentation-pymongo = "^0.39b0" From 225b549932fdf4feaf9e477fc33265d747f0c55f Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Fri, 23 Jun 2023 11:25:01 +0800 Subject: [PATCH 12/17] refactor to Factory model --- uptrace/__init__.py | 40 ++++++++++++++++++++++++++++++++++++++++ uptrace/app.py | 13 ++++++------- 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 uptrace/__init__.py diff --git a/uptrace/__init__.py b/uptrace/__init__.py new file mode 100644 index 0000000..4a12b2b --- /dev/null +++ b/uptrace/__init__.py @@ -0,0 +1,40 @@ +from flask import Flask +from celery import Celery, Task + +def create_app() -> Flask: + app = Flask(__name__) + app.config.from_mapping( + CELERY=dict( + broker_url="redis://localhost", + result_backend="redis://localhost", + task_ignore_result=True, + ), + ) + app.config.from_prefixed_env() + celery_init_app(app) + return app + + +def celery_init_app(app: Flask) -> Celery: + class FlaskTask(Task): + def __call__(self, *args: object, **kwargs: object) -> object: + with app.app_context(): + return self.run(*args, **kwargs) + + celery_app = Celery(app.name, task_cls=FlaskTask) + celery_app.config_from_object(app.config["CELERY"]) + celery_app.set_default() + app.extensions["celery"] = celery_app + return celery_app + + +app = create_app() +app.config['CELERY'] = { + 'broker_url': 'redis://redis', + 'result_backend': 'redis://localhost', +} +app.config['MONGODB_SETTINGS'] = { + 'host': 'mongodb://mongo/dev' +} + +celery_app = celery_init_app(app) diff --git a/uptrace/app.py b/uptrace/app.py index 90deb88..38ae411 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -1,6 +1,7 @@ import os import time import grpc +import celery from opentelemetry.instrumentation.pymongo import PymongoInstrumentor @@ -28,6 +29,8 @@ from flask import Flask, request, Response, make_response from flask_mongoengine import MongoEngine +from . import app + resource = Resource( attributes={"service.name": "myservice", "service.version": "1.0.0"} ) @@ -79,16 +82,12 @@ counter = meter.create_counter("some.prefix.counter", description="TODO") -app = Flask(__name__) -app.config['MONGODB_SETTINGS'] = { - 'host': 'mongodb://mongo/dev' -} +FlaskInstrumentor().instrument_app(app) + +# Mongo # NOTE: Need to call instrument before mongoengine initialize. PymongoInstrumentor().instrument() db = MongoEngine(app) -FlaskInstrumentor().instrument_app(app) - - class User(db.Document): username = db.StringField(required=True) From c6a9a62d118649005ff970c1db293e9615692824 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Fri, 23 Jun 2023 12:32:07 +0800 Subject: [PATCH 13/17] Update gitignore --- uptrace/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uptrace/.gitignore b/uptrace/.gitignore index 96403d3..2812bcc 100644 --- a/uptrace/.gitignore +++ b/uptrace/.gitignore @@ -1 +1 @@ -__pycache__/* +*__pycache__ From e7d9ed1733a84fc6f21283933e4d1caeef1f8bba Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Fri, 23 Jun 2023 12:32:42 +0800 Subject: [PATCH 14/17] Cleaup --- uptrace/app.py | 67 ++----------- uptrace/{ => demo}/__init__.py | 30 ++---- uptrace/demo/endpoints/__init__.py | 61 ++++++++++++ uptrace/demo/endpoints_old.py | 145 +++++++++++++++++++++++++++++ uptrace/demo/models.py | 4 + uptrace/demo/settings.py | 9 ++ 6 files changed, 236 insertions(+), 80 deletions(-) rename uptrace/{ => demo}/__init__.py (55%) create mode 100644 uptrace/demo/endpoints/__init__.py create mode 100644 uptrace/demo/endpoints_old.py create mode 100644 uptrace/demo/models.py create mode 100644 uptrace/demo/settings.py diff --git a/uptrace/app.py b/uptrace/app.py index 38ae411..6a5978a 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -1,3 +1,4 @@ +import demo import os import time import grpc @@ -29,7 +30,7 @@ from flask import Flask, request, Response, make_response from flask_mongoengine import MongoEngine -from . import app +from demo import endpoints resource = Resource( attributes={"service.name": "myservice", "service.version": "1.0.0"} @@ -82,64 +83,10 @@ counter = meter.create_counter("some.prefix.counter", description="TODO") +app = demo.create_app() + +app.register_blueprint(endpoints.app) +celery_app = demo.celery_init_app(app) + FlaskInstrumentor().instrument_app(app) -# Mongo -# NOTE: Need to call instrument before mongoengine initialize. -PymongoInstrumentor().instrument() -db = MongoEngine(app) -class User(db.Document): - username = db.StringField(required=True) - - -@app.route('/user', methods={'POST'}, endpoint='create_user') -def create_user(): - payload = request.get_json() - - if not (username := payload.get('username')): - return Response(status=400) - - if user := User.objects.create(username=username): - response = make_response({ - 'id': str(user.id), - 'username': user.username - }) - response.status = 201 - return response - - -@app.route('/user/', methods={'GET'}, endpoint='get_user_by_id') -def get_user_by_id(user_id: str): - - if not (user := User.objects.filter(id=user_id).first()): - return Response(status=404) - - - response = make_response({ - 'id': str(user.id), - 'username': user.username - }) - return response - - -@app.route("/roll") -def toll_dice2(): - return str(randint(1, 6)) - -@app.route("/roll-long") -def roll_dice(): - counter.add(1) - rolled = randint(1, 6) - time.sleep(0.1 * rolled) - return str(rolled) - return str(do_roll()) - -def do_roll(): - with tracer.start_as_current_span("main") as rollspan: - trace_id = rollspan.get_span_context().trace_id - print(f"trace id: {trace_id:0{32}x}") - res = randint(1, 6) - rollspan.set_attribute("roll.value", res) - # This adds 1 to the counter for the given roll value - # roll_counter.add(1, {"roll.value": res}) - return res diff --git a/uptrace/__init__.py b/uptrace/demo/__init__.py similarity index 55% rename from uptrace/__init__.py rename to uptrace/demo/__init__.py index 4a12b2b..63f094f 100644 --- a/uptrace/__init__.py +++ b/uptrace/demo/__init__.py @@ -1,17 +1,19 @@ from flask import Flask from celery import Celery, Task +from flask_mongoengine import MongoEngine +from opentelemetry.instrumentation.pymongo import PymongoInstrumentor + + +db = MongoEngine() def create_app() -> Flask: app = Flask(__name__) - app.config.from_mapping( - CELERY=dict( - broker_url="redis://localhost", - result_backend="redis://localhost", - task_ignore_result=True, - ), - ) - app.config.from_prefixed_env() + app.config.from_object('demo.settings.Config') celery_init_app(app) + + # NOTE: Need to call instrument before mongoengine initialize. + PymongoInstrumentor().instrument() + db.init_app(app) return app @@ -26,15 +28,3 @@ def __call__(self, *args: object, **kwargs: object) -> object: celery_app.set_default() app.extensions["celery"] = celery_app return celery_app - - -app = create_app() -app.config['CELERY'] = { - 'broker_url': 'redis://redis', - 'result_backend': 'redis://localhost', -} -app.config['MONGODB_SETTINGS'] = { - 'host': 'mongodb://mongo/dev' -} - -celery_app = celery_init_app(app) diff --git a/uptrace/demo/endpoints/__init__.py b/uptrace/demo/endpoints/__init__.py new file mode 100644 index 0000000..28dbd67 --- /dev/null +++ b/uptrace/demo/endpoints/__init__.py @@ -0,0 +1,61 @@ +import random +import time + +from flask import Blueprint, request, make_response, Response + +from demo.models import User + +app = Blueprint( 'endpoints', __name__) + + +@app.route('/user', methods={'POST'}, endpoint='create_user') +def create_user(): + payload = request.get_json() + + if not (username := payload.get('username')): + return Response(status=400) + + if user := User.objects.create(username=username): + response = make_response({ + 'id': str(user.id), + 'username': user.username + }) + response.status = 201 + return response + + +@app.route('/user/', methods={'GET'}, endpoint='get_user_by_id') +def get_user_by_id(user_id: str): + + if not (user := User.objects.filter(id=user_id).first()): + return Response(status=404) + + + response = make_response({ + 'id': str(user.id), + 'username': user.username + }) + return response + + +@app.route("/roll") +def toll_dice2(): + return str(random.randint(1, 6)) + +@app.route("/roll-long") +def roll_dice(): + # counter.add(1) + rolled = random.randint(1, 6) + time.sleep(0.1 * rolled) + return str(rolled) + return str(do_roll()) + +# def do_roll(): +# with tracer.start_as_current_span("main") as rollspan: +# trace_id = rollspan.get_span_context().trace_id +# print(f"trace id: {trace_id:0{32}x}") +# res = randint(1, 6) +# rollspan.set_attribute("roll.value", res) +# # This adds 1 to the counter for the given roll value +# # roll_counter.add(1, {"roll.value": res}) +# return res diff --git a/uptrace/demo/endpoints_old.py b/uptrace/demo/endpoints_old.py new file mode 100644 index 0000000..1ab1e11 --- /dev/null +++ b/uptrace/demo/endpoints_old.py @@ -0,0 +1,145 @@ +# import os +# import time +# import grpc +# import celery + + +# from opentelemetry.instrumentation.pymongo import PymongoInstrumentor + +# from opentelemetry import trace, metrics +# from opentelemetry.sdk import metrics as sdkmetrics +# from opentelemetry.sdk.resources import Resource +# from opentelemetry.sdk.trace import TracerProvider +# from opentelemetry.sdk.trace.export import BatchSpanProcessor +# from opentelemetry.sdk.metrics import MeterProvider +# from opentelemetry.sdk.metrics.export import ( +# AggregationTemporality, +# PeriodicExportingMetricReader, +# ) +# from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( +# OTLPSpanExporter, +# ) +# from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import ( +# OTLPMetricExporter, +# ) + +# from opentelemetry.instrumentation.flask import FlaskInstrumentor + +# from random import randint +# from flask import Flask, request, Response, make_response +# from flask_mongoengine import MongoEngine + +# from . import app + +# resource = Resource( +# attributes={"service.name": "myservice", "service.version": "1.0.0"} +# ) + +# # Trace +# tracer_provider = TracerProvider( +# resource=resource, +# ) +# trace.set_tracer_provider(tracer_provider) + +# exporter = OTLPSpanExporter( +# endpoint="http://otelcol:4317", +# # Set the Uptrace dsn here or use UPTRACE_DSN env var. +# # headers=(("uptrace-dsn", dsn),), +# timeout=5, +# compression=grpc.Compression.Gzip, +# ) + +# span_processor = BatchSpanProcessor( +# exporter, +# max_queue_size=1000, +# max_export_batch_size=1000, +# ) +# tracer_provider.add_span_processor(span_processor) +# tracer = trace.get_tracer("app_or_package_name", "1.0.0") + + +# # Metrix +# temporality_delta = { +# sdkmetrics.Counter: AggregationTemporality.DELTA, +# sdkmetrics.UpDownCounter: AggregationTemporality.DELTA, +# sdkmetrics.Histogram: AggregationTemporality.DELTA, +# sdkmetrics.ObservableCounter: AggregationTemporality.DELTA, +# sdkmetrics.ObservableUpDownCounter: AggregationTemporality.DELTA, +# sdkmetrics.ObservableGauge: AggregationTemporality.DELTA, +# } + +# metric_exporter = OTLPMetricExporter( +# endpoint="http://otelcol:4317", +# # headers=(("uptrace-dsn", dsn),), +# timeout=5, +# compression=grpc.Compression.Gzip, +# preferred_temporality=temporality_delta, +# ) +# reader = PeriodicExportingMetricReader(metric_exporter) +# provider = MeterProvider(metric_readers=[reader], resource=resource) +# metrics.set_meter_provider(provider) +# meter = metrics.get_meter("github.com/uptrace/uptrace-python", "1.0.0") +# counter = meter.create_counter("some.prefix.counter", description="TODO") + + +# FlaskInstrumentor().instrument_app(app) + +# # Mongo +# # NOTE: Need to call instrument before mongoengine initialize. +# PymongoInstrumentor().instrument() +# db = MongoEngine(app) +# class User(db.Document): +# username = db.StringField(required=True) + + +@app.route('/user', methods={'POST'}, endpoint='create_user') +def create_user(): + payload = request.get_json() + + if not (username := payload.get('username')): + return Response(status=400) + + if user := User.objects.create(username=username): + response = make_response({ + 'id': str(user.id), + 'username': user.username + }) + response.status = 201 + return response + + +@app.route('/user/', methods={'GET'}, endpoint='get_user_by_id') +def get_user_by_id(user_id: str): + + if not (user := User.objects.filter(id=user_id).first()): + return Response(status=404) + + + response = make_response({ + 'id': str(user.id), + 'username': user.username + }) + return response + + +@app.route("/roll") +def toll_dice2(): + return str(randint(1, 6)) + +@app.route("/roll-long") +def roll_dice(): + counter.add(1) + rolled = randint(1, 6) + time.sleep(0.1 * rolled) + return str(rolled) + return str(do_roll()) + +def do_roll(): + with tracer.start_as_current_span("main") as rollspan: + trace_id = rollspan.get_span_context().trace_id + print(f"trace id: {trace_id:0{32}x}") + res = randint(1, 6) + rollspan.set_attribute("roll.value", res) + # This adds 1 to the counter for the given roll value + # roll_counter.add(1, {"roll.value": res}) + return res diff --git a/uptrace/demo/models.py b/uptrace/demo/models.py new file mode 100644 index 0000000..6f0186b --- /dev/null +++ b/uptrace/demo/models.py @@ -0,0 +1,4 @@ +from demo import db + +class User(db.Document): + username = db.StringField(required=True) diff --git a/uptrace/demo/settings.py b/uptrace/demo/settings.py new file mode 100644 index 0000000..f23f988 --- /dev/null +++ b/uptrace/demo/settings.py @@ -0,0 +1,9 @@ +class Config: + CELERY = { + 'broker_url': 'redis://redis', + 'result_backend': 'redis://localhost', + } + + MONGODB_SETTINGS = { + 'host': 'mongodb://mongo/dev' + } From 7edfac96eb924bcdc7b9014453635d08a4ad6e9a Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Fri, 23 Jun 2023 15:26:18 +0800 Subject: [PATCH 15/17] Add celery --- uptrace/demo/__init__.py | 1 + uptrace/demo/endpoints/__init__.py | 11 ++- uptrace/demo/settings.py | 2 +- uptrace/demo/tasks.py | 9 ++ uptrace/docker-compose.yaml | 16 ++-- uptrace/poetry.lock | 133 ++++++++++++++++++++++++++++- uptrace/pyproject.toml | 1 + 7 files changed, 161 insertions(+), 12 deletions(-) create mode 100644 uptrace/demo/tasks.py diff --git a/uptrace/demo/__init__.py b/uptrace/demo/__init__.py index 63f094f..7904042 100644 --- a/uptrace/demo/__init__.py +++ b/uptrace/demo/__init__.py @@ -9,6 +9,7 @@ def create_app() -> Flask: app = Flask(__name__) app.config.from_object('demo.settings.Config') + app.config.from_prefixed_env() celery_init_app(app) # NOTE: Need to call instrument before mongoengine initialize. diff --git a/uptrace/demo/endpoints/__init__.py b/uptrace/demo/endpoints/__init__.py index 28dbd67..bbd9d45 100644 --- a/uptrace/demo/endpoints/__init__.py +++ b/uptrace/demo/endpoints/__init__.py @@ -5,6 +5,8 @@ from demo.models import User +from demo import tasks + app = Blueprint( 'endpoints', __name__) @@ -26,14 +28,15 @@ def create_user(): @app.route('/user/', methods={'GET'}, endpoint='get_user_by_id') def get_user_by_id(user_id: str): - - if not (user := User.objects.filter(id=user_id).first()): + if not (username := tasks.get_username_by_id.delay( + user_id=user_id + ).get()): return Response(status=404) response = make_response({ - 'id': str(user.id), - 'username': user.username + 'id': user_id, + 'username': username, }) return response diff --git a/uptrace/demo/settings.py b/uptrace/demo/settings.py index f23f988..589163b 100644 --- a/uptrace/demo/settings.py +++ b/uptrace/demo/settings.py @@ -1,7 +1,7 @@ class Config: CELERY = { 'broker_url': 'redis://redis', - 'result_backend': 'redis://localhost', + 'result_backend': 'redis://redis', } MONGODB_SETTINGS = { diff --git a/uptrace/demo/tasks.py b/uptrace/demo/tasks.py new file mode 100644 index 0000000..df10c73 --- /dev/null +++ b/uptrace/demo/tasks.py @@ -0,0 +1,9 @@ +import celery + +from demo import models + +@celery.shared_task(bind=True, ignore_resullt=False) +def get_username_by_id(task, user_id: str) -> dict: + if not (user := models.User.objects.filter(id=user_id).first()): + return + return user.username diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 14a239e..53a6106 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -28,8 +28,6 @@ services: - .:/usr/src/app ports: - 8001:8001 - - clickhouse: image: clickhouse/clickhouse-server:22.10 restart: on-failure @@ -45,7 +43,6 @@ services: ports: - '8123:8123' - '9000:9000' - postgres: image: postgres:15-alpine restart: on-failure @@ -63,7 +60,6 @@ services: - 'pg_data4:/var/lib/postgresql/data/pgdata' ports: - '5432:5432' - uptrace: image: 'uptrace/uptrace:1.4.8' #image: 'uptrace/uptrace-dev:latest' @@ -76,7 +72,6 @@ services: ports: - '14317:14317' - '14318:14318' - otelcol: image: otel/opentelemetry-collector-contrib:0.77.0 restart: on-failure @@ -92,7 +87,6 @@ services: - 4317:4317 - 4318:4318 - 8888:8888 - mongo: image: mongo restart: always @@ -100,6 +94,16 @@ services: - mongo:/data/db ports: - 27017:27017 + redis: + image: redis:7.0.11-alpine + ports: + - 6379:6379 + worker: + build: . + command: celery -A app:celery_app worker --loglevel INFO + # command: sleep 1000 + volumes: + - .:/usr/src/app volumes: ch_data7: diff --git a/uptrace/poetry.lock b/uptrace/poetry.lock index 8db61da..0fc61df 100644 --- a/uptrace/poetry.lock +++ b/uptrace/poetry.lock @@ -15,6 +15,18 @@ files = [ [package.dependencies] vine = ">=5.0.0" +[[package]] +name = "async-timeout" +version = "4.0.2" +description = "Timeout context manager for asyncio programs" +category = "main" +optional = false +python-versions = ">=3.6" +files = [ + {file = "async-timeout-4.0.2.tar.gz", hash = "sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15"}, + {file = "async_timeout-4.0.2-py3-none-any.whl", hash = "sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c"}, +] + [[package]] name = "backoff" version = "2.2.1" @@ -689,6 +701,105 @@ files = [ [package.extras] protobuf = ["grpcio-tools (>=1.54.2)"] +[[package]] +name = "hiredis" +version = "2.2.3" +description = "Python wrapper for hiredis" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "hiredis-2.2.3-cp310-cp310-macosx_10_12_universal2.whl", hash = "sha256:9a1a80a8fa767f2fdc3870316a54b84fe9fc09fa6ab6a2686783de6a228a4604"}, + {file = "hiredis-2.2.3-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3f006c28c885deb99b670a5a66f367a175ab8955b0374029bad7111f5357dcd4"}, + {file = "hiredis-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffaf841546905d90ff189de7397aa56413b1ce5e54547f17a98f0ebf3a3b0a3b"}, + {file = "hiredis-2.2.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1cadb0ac7ba3babfd804e425946bec9717b320564a1390f163a54af9365a720a"}, + {file = "hiredis-2.2.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:33bc4721632ef9708fa44e5df0066053fccc8e65410a2c48573192517a533b48"}, + {file = "hiredis-2.2.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:227c5b4bcb60f89008c275d596e4a7b6625a6b3c827b8a66ae582eace7051f71"}, + {file = "hiredis-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61995eb826009d99ed8590747bc0da683a5f4fbb4faa8788166bf3810845cd5c"}, + {file = "hiredis-2.2.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f969edc851efe23010e0f53a64269f2629a9364135e9ec81c842e8b2277d0c1"}, + {file = "hiredis-2.2.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d27e560eefb57914d742a837f1da98d3b29cb22eff013c8023b7cf52ae6e051d"}, + {file = "hiredis-2.2.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3759f4789ae1913b7df278dfc9e8749205b7a106f888cd2903d19461e24a7697"}, + {file = "hiredis-2.2.3-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c6cb613148422c523945cdb8b6bed617856f2602fd8750e33773ede2616e55d5"}, + {file = "hiredis-2.2.3-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:1d274d5c511dfc03f83f997d3238eaa9b6ee3f982640979f509373cced891e98"}, + {file = "hiredis-2.2.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:3b7fe075e91b9d9cff40eba4fb6a8eff74964d3979a39be9a9ef58b1b4cb3604"}, + {file = "hiredis-2.2.3-cp310-cp310-win32.whl", hash = "sha256:77924b0d32fd1f493d3df15d9609ddf9d94c31a364022a6bf6b525ce9da75bea"}, + {file = "hiredis-2.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:dcb0569dd5bfe6004658cd0f229efa699a3169dcb4f77bd72e188adda302063d"}, + {file = "hiredis-2.2.3-cp311-cp311-macosx_10_12_universal2.whl", hash = "sha256:d115790f18daa99b5c11a506e48923b630ef712e9e4b40482af942c3d40638b8"}, + {file = "hiredis-2.2.3-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c3b8be557e08b234774925622e196f0ee36fe4eab66cd19df934d3efd8f3743"}, + {file = "hiredis-2.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:3f5446068197b35a11ccc697720c41879c8657e2e761aaa8311783aac84cef20"}, + {file = "hiredis-2.2.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aa17a3b22b3726d54d7af20394f65d4a1735a842a4e0f557dc67a90f6965c4bc"}, + {file = "hiredis-2.2.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7df645b6b7800e8b748c217fbd6a4ca8361bcb9a1ae6206cc02377833ec8a1aa"}, + {file = "hiredis-2.2.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2fb9300959a0048138791f3d68359d61a788574ec9556bddf1fec07f2dbc5320"}, + {file = "hiredis-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2d7e459fe7313925f395148d36d9b7f4f8dac65be06e45d7af356b187cef65fc"}, + {file = "hiredis-2.2.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8eceffca3941775b646cd585cd19b275d382de43cc3327d22f7c75d7b003d481"}, + {file = "hiredis-2.2.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b17baf702c6e5b4bb66e1281a3efbb1d749c9d06cdb92b665ad81e03118f78fc"}, + {file = "hiredis-2.2.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4e43e2b5acaad09cf48c032f7e4926392bb3a3f01854416cf6d82ebff94d5467"}, + {file = "hiredis-2.2.3-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:a7205497d7276a81fe92951a29616ef96562ed2f91a02066f72b6f93cb34b40e"}, + {file = "hiredis-2.2.3-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:126623b03c31cb6ac3e0d138feb6fcc36dd43dd34fc7da7b7a0c38b5d75bc896"}, + {file = "hiredis-2.2.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:071c5814b850574036506a8118034f97c3cbf2fe9947ff45a27b07a48da56240"}, + {file = "hiredis-2.2.3-cp311-cp311-win32.whl", hash = "sha256:d1be9e30e675f5bc1cb534633324578f6f0944a1bcffe53242cf632f554f83b6"}, + {file = "hiredis-2.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:b9a7c987e161e3c58f992c63b7e26fea7fe0777f3b975799d23d65bbb8cb5899"}, + {file = "hiredis-2.2.3-cp37-cp37m-macosx_10_12_x86_64.whl", hash = "sha256:f2dcb8389fa3d453927b1299f46bdb38473c293c8269d5c777d33ea0e526b610"}, + {file = "hiredis-2.2.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a2df98f5e071320c7d84e8bd07c0542acdd0a7519307fc31774d60e4b842ec4f"}, + {file = "hiredis-2.2.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:61a72e4a523cdfc521762137559c08dfa360a3caef63620be58c699d1717dac1"}, + {file = "hiredis-2.2.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c9b9e5bde7030cae83aa900b5bd660decc65afd2db8c400f3c568c815a47ca2a"}, + {file = "hiredis-2.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cd2614f17e261f72efc2f19f5e5ff2ee19e2296570c0dcf33409e22be30710de"}, + {file = "hiredis-2.2.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:46525fbd84523cac75af5bf524bc74aaac848beaf31b142d2df8a787d9b4bbc4"}, + {file = "hiredis-2.2.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d1a4ce40ba11da9382c14da31f4f9e88c18f7d294f523decd0fadfb81f51ad18"}, + {file = "hiredis-2.2.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:5cda592405bbd29d53942e0389dc3fa77b49c362640210d7e94a10c14a677d4d"}, + {file = "hiredis-2.2.3-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:5e6674a017629284ef373b50496d9fb1a89b85a20a7fa100ecd109484ec748e5"}, + {file = "hiredis-2.2.3-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:e62ec131816c6120eff40dffe43424e140264a15fa4ab88c301bd6a595913af3"}, + {file = "hiredis-2.2.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:17e938d9d3ee92e1adbff361706f1c36cc60eeb3e3eeca7a3a353eae344f4c91"}, + {file = "hiredis-2.2.3-cp37-cp37m-win32.whl", hash = "sha256:95d2305fd2a7b179cacb48b10f618872fc565c175f9f62b854e8d1acac3e8a9e"}, + {file = "hiredis-2.2.3-cp37-cp37m-win_amd64.whl", hash = "sha256:8f9dbe12f011a9b784f58faecc171d22465bb532c310bd588d769ba79a59ef5a"}, + {file = "hiredis-2.2.3-cp38-cp38-macosx_10_12_universal2.whl", hash = "sha256:5a4bcef114fc071d5f52c386c47f35aae0a5b43673197b9288a15b584da8fa3a"}, + {file = "hiredis-2.2.3-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:232d0a70519865741ba56e1dfefd160a580ae78c30a1517bad47b3cf95a3bc7d"}, + {file = "hiredis-2.2.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:9076ce8429785c85f824650735791738de7143f61f43ae9ed83e163c0ca0fa44"}, + {file = "hiredis-2.2.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ec58fb7c2062f835595c12f0f02dcda76d0eb0831423cc191d1e18c9276648de"}, + {file = "hiredis-2.2.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7f2b34a6444b8f9c1e9f84bd2c639388e5d14f128afd14a869dfb3d9af893aa2"}, + {file = "hiredis-2.2.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:818dfd310aa1020a13cd08ee48e116dd8c3bb2e23b8161f8ac4df587dd5093d7"}, + {file = "hiredis-2.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:96d9ea6c8d4cbdeee2e0d43379ce2881e4af0454b00570677c59f33f2531cd38"}, + {file = "hiredis-2.2.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f1eadbcd3de55ac42310ff82550d3302cb4efcd4e17d76646a17b6e7004bb42b"}, + {file = "hiredis-2.2.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:477c34c4489666dc73cb5e89dafe2617c3e13da1298917f73d55aac4696bd793"}, + {file = "hiredis-2.2.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:14824e457e4f5cda685c3345d125da13949bcf3bb1c88eb5d248c8d2c3dee08f"}, + {file = "hiredis-2.2.3-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:9cd32326dfa6ce87edf754153b0105aca64486bebe93b9600ccff74fa0b224df"}, + {file = "hiredis-2.2.3-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:51341e70b467004dcbec3a6ce8c478d2d6241e0f6b01e4c56764afd5022e1e9d"}, + {file = "hiredis-2.2.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2443659c76b226267e2a04dbbb21bc2a3f91aa53bdc0c22964632753ae43a247"}, + {file = "hiredis-2.2.3-cp38-cp38-win32.whl", hash = "sha256:4e3e3e31423f888d396b1fc1f936936e52af868ac1ec17dd15e3eeba9dd4de24"}, + {file = "hiredis-2.2.3-cp38-cp38-win_amd64.whl", hash = "sha256:20f509e3a1a20d6e5f5794fc37ceb21f70f409101fcfe7a8bde783894d51b369"}, + {file = "hiredis-2.2.3-cp39-cp39-macosx_10_12_universal2.whl", hash = "sha256:d20891e3f33803b26d54c77fd5745878497091e33f4bbbdd454cf6e71aee8890"}, + {file = "hiredis-2.2.3-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:50171f985e17970f87d5a29e16603d1e5b03bdbf5c2691a37e6c912942a6b657"}, + {file = "hiredis-2.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:9944a2cac25ffe049a7e89f306e11b900640837d1ef38d9be0eaa4a4e2b73a52"}, + {file = "hiredis-2.2.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a5c8019ff94988d56eb49b15de76fe83f6b42536d76edeb6565dbf7fe14b973"}, + {file = "hiredis-2.2.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a286ded34eb16501002e3713b3130c987366eee2ba0d58c33c72f27778e31676"}, + {file = "hiredis-2.2.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4b3e974ad15eb32b1f537730dea70b93a4c3db7b026de3ad2b59da49c6f7454d"}, + {file = "hiredis-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:08415ea74c1c29b9d6a4ca3dd0e810dc1af343c1d1d442e15ba133b11ab5be6a"}, + {file = "hiredis-2.2.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7e17d04ea58ab8cf3f2dc52e875db16077c6357846006780086fff3189fb199d"}, + {file = "hiredis-2.2.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:6ccdcb635dae85b006592f78e32d97f4bc7541cb27829d505f9c7fefcef48298"}, + {file = "hiredis-2.2.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:69536b821dd1bc78058a6e7541743f8d82bf2d981b91280b14c4daa6cdc7faba"}, + {file = "hiredis-2.2.3-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:3753df5f873d473f055e1f8837bfad0bd3b277c86f3c9bf058c58f14204cd901"}, + {file = "hiredis-2.2.3-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6f88cafe46612b6fa68e6dea49e25bebf160598bba00101caa51cc8c1f18d597"}, + {file = "hiredis-2.2.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:33ee3ea5cad3a8cb339352cd230b411eb437a2e75d7736c4899acab32056ccdb"}, + {file = "hiredis-2.2.3-cp39-cp39-win32.whl", hash = "sha256:b4f3d06dc16671b88a13ae85d8ca92534c0b637d59e49f0558d040a691246422"}, + {file = "hiredis-2.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:4f674e309cd055ee7a48304ceb8cf43265d859faf4d7d01d270ce45e976ae9d3"}, + {file = "hiredis-2.2.3-pp37-pypy37_pp73-macosx_10_12_x86_64.whl", hash = "sha256:8f280ab4e043b089777b43b4227bdc2035f88da5072ab36588e0ccf77d45d058"}, + {file = "hiredis-2.2.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:15c2a551f3b8a26f7940d6ee10b837810201754b8d7e6f6b1391655370882c5a"}, + {file = "hiredis-2.2.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:60c4e3c258eafaab21b174b17270a0cc093718d61cdbde8c03f85ec4bf835343"}, + {file = "hiredis-2.2.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cc36a9dded458d4e37492fe3e619c6c83caae794d26ad925adbce61d592f8428"}, + {file = "hiredis-2.2.3-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:4ed68a3b1ccb4313d2a42546fd7e7439ad4745918a48b6c9bcaa61e1e3e42634"}, + {file = "hiredis-2.2.3-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3bf4b5bae472630c229518e4a814b1b68f10a3d9b00aeaec45f1a330f03a0251"}, + {file = "hiredis-2.2.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33a94d264e6e12a79d9bb8af333b01dc286b9f39c99072ab5fef94ce1f018e17"}, + {file = "hiredis-2.2.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3fa6811a618653164f918b891a0fa07052bd71a799defa5c44d167cac5557b26"}, + {file = "hiredis-2.2.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:af33f370be90b48bbaf0dab32decbdcc522b1fa95d109020a963282086518a8e"}, + {file = "hiredis-2.2.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:b9953d87418ac228f508d93898ab572775e4d3b0eeb886a1a7734553bcdaf291"}, + {file = "hiredis-2.2.3-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5e7bb4dd524f50b71c20ef5a12bd61da9b463f8894b18a06130942fe31509881"}, + {file = "hiredis-2.2.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:89a258424158eb8b3ed9f65548d68998da334ef155d09488c5637723eb1cd697"}, + {file = "hiredis-2.2.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9f4a65276f6ecdebe75f2a53f578fbc40e8d2860658420d5e0611c56bbf5054c"}, + {file = "hiredis-2.2.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:334f2738700b20faa04a0d813366fb16ed17287430a6b50584161d5ad31ca6d7"}, + {file = "hiredis-2.2.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:d194decd9608f11c777946f596f31d5aacad13972a0a87829ae1e6f2d26c1885"}, + {file = "hiredis-2.2.3.tar.gz", hash = "sha256:e75163773a309e56a9b58165cf5a50e0f84b755f6ff863b2c01a38918fe92daa"}, +] + [[package]] name = "idna" version = "3.4" @@ -1276,6 +1387,26 @@ files = [ [package.dependencies] six = ">=1.5" +[[package]] +name = "redis" +version = "4.5.5" +description = "Python client for Redis database and key-value store" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "redis-4.5.5-py3-none-any.whl", hash = "sha256:77929bc7f5dab9adf3acba2d3bb7d7658f1e0c2f1cafe7eb36434e751c471119"}, + {file = "redis-4.5.5.tar.gz", hash = "sha256:dc87a0bdef6c8bfe1ef1e1c40be7034390c2ae02d92dcd0c7ca1729443899880"}, +] + +[package.dependencies] +async-timeout = {version = ">=4.0.2", markers = "python_full_version <= \"3.11.2\""} +hiredis = {version = ">=1.0.0", optional = true, markers = "extra == \"hiredis\""} + +[package.extras] +hiredis = ["hiredis (>=1.0.0)"] +ocsp = ["cryptography (>=36.0.1)", "pyopenssl (==20.0.1)", "requests (>=2.26.0)"] + [[package]] name = "requests" version = "2.31.0" @@ -1612,4 +1743,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "275fc040c520705f2ae1cdb449ab4912fce8bb83d3e4076bfac844b246f4e940" +content-hash = "3d74e22f921aaa52125f89028ee492bf75e266bf78a3eac029cc05a48130772f" diff --git a/uptrace/pyproject.toml b/uptrace/pyproject.toml index f02f016..415fd86 100644 --- a/uptrace/pyproject.toml +++ b/uptrace/pyproject.toml @@ -19,6 +19,7 @@ mongoengine = "^0.27.0" celery = "^5.3.1" flask-mongoengine = "^1.0.0" opentelemetry-instrumentation-pymongo = "^0.39b0" +redis = {extras = ["hiredis"], version = "^4.5.5"} From c1c7ec2ab8b04f3a71ebf785ec7f0140b8b2bd2f Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Fri, 23 Jun 2023 15:54:44 +0800 Subject: [PATCH 16/17] Add celery opentelemetry --- uptrace/demo/__init__.py | 7 ++++++- uptrace/docker-compose.yaml | 16 ++++++++-------- uptrace/poetry.lock | 23 ++++++++++++++++++++++- uptrace/pyproject.toml | 1 + 4 files changed, 37 insertions(+), 10 deletions(-) diff --git a/uptrace/demo/__init__.py b/uptrace/demo/__init__.py index 7904042..e447e51 100644 --- a/uptrace/demo/__init__.py +++ b/uptrace/demo/__init__.py @@ -1,7 +1,8 @@ from flask import Flask -from celery import Celery, Task +from celery import Celery, Task, signals from flask_mongoengine import MongoEngine from opentelemetry.instrumentation.pymongo import PymongoInstrumentor +from opentelemetry.instrumentation.celery import CeleryInstrumentor db = MongoEngine() @@ -24,6 +25,10 @@ def __call__(self, *args: object, **kwargs: object) -> object: with app.app_context(): return self.run(*args, **kwargs) + @signals.worker_process_init.connect(weak=False) + def init_celery_tracing(*args, **kwargs): + CeleryInstrumentor().instrument() + celery_app = Celery(app.name, task_cls=FlaskTask) celery_app.config_from_object(app.config["CELERY"]) celery_app.set_default() diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 53a6106..6798bea 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -12,14 +12,14 @@ services: # --service_name nino-flask-cli # --exporter_otlp_endpoint http://otelcol:4317 # flask run --host 0.0.0.0 -p 8001 --reload - command: flask run --host 0.0.0.0 -p 8001 --reload - # command: > - # uwsgi - # --single-interpreter - # --enable-threads - # --ini config/uwsgi.ini - # --gevent 100 - # --http 0.0.0.0:8001 + # command: flask run --host 0.0.0.0 -p 8001 --reload + command: > + uwsgi + --single-interpreter + --enable-threads + --ini config/uwsgi.ini + --gevent 100 + --http 0.0.0.0:8001 environment: GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt # env_file: diff --git a/uptrace/poetry.lock b/uptrace/poetry.lock index 0fc61df..1672f35 100644 --- a/uptrace/poetry.lock +++ b/uptrace/poetry.lock @@ -1105,6 +1105,27 @@ opentelemetry-api = ">=1.4,<2.0" setuptools = ">=16.0" wrapt = ">=1.0.0,<2.0.0" +[[package]] +name = "opentelemetry-instrumentation-celery" +version = "0.39b0" +description = "OpenTelemetry Celery Instrumentation" +category = "main" +optional = false +python-versions = ">=3.7" +files = [ + {file = "opentelemetry_instrumentation_celery-0.39b0-py3-none-any.whl", hash = "sha256:7f7c8a6461baed4a67b70d90960fe5ebe77eb37a033c8df8b1153a2960cb4295"}, + {file = "opentelemetry_instrumentation_celery-0.39b0.tar.gz", hash = "sha256:6e0dbf92ad24a6953bcfd717004a71a082c4c641be4d25471fe25a89c5dda6aa"}, +] + +[package.dependencies] +opentelemetry-api = ">=1.12,<2.0" +opentelemetry-instrumentation = "0.39b0" +opentelemetry-semantic-conventions = "0.39b0" + +[package.extras] +instruments = ["celery (>=4.0,<6.0)"] +test = ["opentelemetry-instrumentation-celery[instruments]", "opentelemetry-test-utils (==0.39b0)", "pytest"] + [[package]] name = "opentelemetry-instrumentation-flask" version = "0.39b0" @@ -1743,4 +1764,4 @@ testing = ["coverage (>=5.0.3)", "zope.event", "zope.testing"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "3d74e22f921aaa52125f89028ee492bf75e266bf78a3eac029cc05a48130772f" +content-hash = "455476f6a2576385ec493e02c6d0679feb43f96d0caa4ff1db50271f7cbbc43b" diff --git a/uptrace/pyproject.toml b/uptrace/pyproject.toml index 415fd86..6e4c4b8 100644 --- a/uptrace/pyproject.toml +++ b/uptrace/pyproject.toml @@ -20,6 +20,7 @@ celery = "^5.3.1" flask-mongoengine = "^1.0.0" opentelemetry-instrumentation-pymongo = "^0.39b0" redis = {extras = ["hiredis"], version = "^4.5.5"} +opentelemetry-instrumentation-celery = "^0.39b0" From 0fbd958a76ade4f8416e1d172cc71ae9006cc866 Mon Sep 17 00:00:00 2001 From: Robert-Rino Date: Wed, 26 Jul 2023 00:43:08 +0800 Subject: [PATCH 17/17] WIP --- uptrace/.env | 9 - uptrace/Dockerfile | 6 +- uptrace/app.py | 103 +++-------- uptrace/config/otel-collector.yaml | 54 ++++++ uptrace/config/uptrace.yml | 24 +++ uptrace/demo/__init__.py | 12 +- uptrace/demo/endpoints/__init__.py | 21 +-- uptrace/docker-compose.yaml | 107 ++++++------ uptrace/otel-collector.yaml | 162 ------------------ uptrace/uptrace.yml | 263 ----------------------------- 10 files changed, 164 insertions(+), 597 deletions(-) create mode 100644 uptrace/config/otel-collector.yaml create mode 100644 uptrace/config/uptrace.yml delete mode 100644 uptrace/otel-collector.yaml delete mode 100644 uptrace/uptrace.yml diff --git a/uptrace/.env b/uptrace/.env index bff904b..e69de29 100644 --- a/uptrace/.env +++ b/uptrace/.env @@ -1,9 +0,0 @@ -OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 -OTEL_SERVICE_NAME=nino-flask-cli -# OTEL_TRACES_EXPORTER=console -# OTEL_METRICS_EXPORTER=console -# OTEL_LOGS_EXPORTER=console -OTEL_EXPORTER_OTLP_ENDPOINT=http://otelcol:4317 -OTEL_PYTHON_LOG_LEVEL=debug -OTEL_TRACES_SAMPLER=always_on -OTEL_BSP_SCHEDULE_DELAY=1000 diff --git a/uptrace/Dockerfile b/uptrace/Dockerfile index ee11498..fb089c0 100644 --- a/uptrace/Dockerfile +++ b/uptrace/Dockerfile @@ -9,18 +9,20 @@ ENV POETRY_VERSION=${POETRY_VERSION} RUN apt-get update && \ apt-get -y install build-essential \ curl && \ - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py | python + curl -sSL https://install.python-poetry.org | python ### FROM ${base} AS builder -WORKDIR /usr/src/app +ENV FLASK_APP=app.py ENV PATH=/root/.local/bin:$PATH ENV POETRY_VIRTUALENVS_CREATE=false ENV PIP_DISABLE_PIP_VERSION_CHECK=on +WORKDIR /usr/src/app + COPY --from=poetry /root/.local /root/.local COPY pyproject.toml . diff --git a/uptrace/app.py b/uptrace/app.py index 6a5978a..0486272 100644 --- a/uptrace/app.py +++ b/uptrace/app.py @@ -1,92 +1,39 @@ import demo import os -import time -import grpc import celery +import opentelemetry +import opentelemetry.exporter.otlp.proto.grpc.metric_exporter +import opentelemetry.exporter.otlp.proto.grpc.trace_exporter +import opentelemetry.instrumentation.wsgi +import opentelemetry.sdk.metrics +import opentelemetry.sdk.trace +import opentelemetry.sdk.trace.export +import opentelemetry.semconv.trace +import pkg_resources -from opentelemetry.instrumentation.pymongo import PymongoInstrumentor -from opentelemetry import trace, metrics -from opentelemetry.sdk import metrics as sdkmetrics -from opentelemetry.sdk.resources import Resource -from opentelemetry.sdk.trace import TracerProvider -from opentelemetry.sdk.trace.export import BatchSpanProcessor -from opentelemetry.sdk.metrics import MeterProvider -from opentelemetry.sdk.metrics.export import ( - AggregationTemporality, - PeriodicExportingMetricReader, +tracer = opentelemetry.sdk.trace.TracerProvider() +tracer.add_span_processor( + opentelemetry.sdk.trace.export.BatchSpanProcessor( + opentelemetry.exporter.otlp.proto.grpc.trace_exporter.OTLPSpanExporter(), + ), ) -from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import ( - OTLPSpanExporter, -) -from opentelemetry.exporter.otlp.proto.grpc.metric_exporter import ( - OTLPMetricExporter, -) - -from opentelemetry.instrumentation.flask import FlaskInstrumentor +opentelemetry.trace.set_tracer_provider(tracer) -from random import randint -from flask import Flask, request, Response, make_response -from flask_mongoengine import MongoEngine - -from demo import endpoints - -resource = Resource( - attributes={"service.name": "myservice", "service.version": "1.0.0"} -) - -# Trace -tracer_provider = TracerProvider( - resource=resource, -) -trace.set_tracer_provider(tracer_provider) - -exporter = OTLPSpanExporter( - endpoint="http://otelcol:4317", - # Set the Uptrace dsn here or use UPTRACE_DSN env var. - # headers=(("uptrace-dsn", dsn),), - timeout=5, - compression=grpc.Compression.Gzip, -) - -span_processor = BatchSpanProcessor( - exporter, - max_queue_size=1000, - max_export_batch_size=1000, -) -tracer_provider.add_span_processor(span_processor) -tracer = trace.get_tracer("app_or_package_name", "1.0.0") - - -# Metrix -temporality_delta = { - sdkmetrics.Counter: AggregationTemporality.DELTA, - sdkmetrics.UpDownCounter: AggregationTemporality.DELTA, - sdkmetrics.Histogram: AggregationTemporality.DELTA, - sdkmetrics.ObservableCounter: AggregationTemporality.DELTA, - sdkmetrics.ObservableUpDownCounter: AggregationTemporality.DELTA, - sdkmetrics.ObservableGauge: AggregationTemporality.DELTA, -} - -metric_exporter = OTLPMetricExporter( - endpoint="http://otelcol:4317", - # headers=(("uptrace-dsn", dsn),), - timeout=5, - compression=grpc.Compression.Gzip, - preferred_temporality=temporality_delta, -) -reader = PeriodicExportingMetricReader(metric_exporter) -provider = MeterProvider(metric_readers=[reader], resource=resource) -metrics.set_meter_provider(provider) -meter = metrics.get_meter("github.com/uptrace/uptrace-python", "1.0.0") -counter = meter.create_counter("some.prefix.counter", description="TODO") +meter = opentelemetry.sdk.metrics.MeterProvider([ + opentelemetry.sdk.metrics.export.PeriodicExportingMetricReader( + opentelemetry.exporter.otlp.proto.grpc.metric_exporter.OTLPMetricExporter() + ) +]) +opentelemetry.metrics.set_meter_provider(meter) +for entry_point in pkg_resources.iter_entry_points('opentelemetry_instrumentor'): + Instrumentor = entry_point.load() + Instrumentor().instrument() app = demo.create_app() -app.register_blueprint(endpoints.app) +# app.register_blueprint(demo.endpoints.app) celery_app = demo.celery_init_app(app) -FlaskInstrumentor().instrument_app(app) - diff --git a/uptrace/config/otel-collector.yaml b/uptrace/config/otel-collector.yaml new file mode 100644 index 0000000..7c03f4b --- /dev/null +++ b/uptrace/config/otel-collector.yaml @@ -0,0 +1,54 @@ +# REF: https://opentelemetry.io/docs/collector/configuration/ + +receivers: + otlp: + protocols: + grpc: + http: + +processors: + batch: + send_batch_size: 10000 + timeout: 10s + cumulativetodelta: + resourcedetection: + detectors: + - env + - system + +exporters: + otlp: + endpoint: uptrace:14317 + headers: + uptrace-dsn: '${env:UPTRACE_DSN}' + tls: + insecure: true + logging: + loglevel: info + +service: + pipelines: + traces: + receivers: + - otlp + processors: + - batch + exporters: + - otlp + - logging + metrics: + receivers: + - otlp + processors: + - batch + exporters: + - otlp + - logging + logs: + receivers: + - otlp + processors: + - batch + exporters: + - otlp + - logging diff --git a/uptrace/config/uptrace.yml b/uptrace/config/uptrace.yml new file mode 100644 index 0000000..0300b36 --- /dev/null +++ b/uptrace/config/uptrace.yml @@ -0,0 +1,24 @@ +# REF: https://uptrace.dev/get/config.html + +ch: + addr: clickhouse:9000 + user: ${CLICKHOUSE_USER} + password: ${CLICKHOUSE_PASSWORD} + database: ${CLICKHOUSE_DB} + +pg: + addr: postgres:5432 + user: ${POSTGRES_USER} + password: ${POSTGRES_PASSWORD} + database: ${POSTGRES_DB} + +projects: + - id: 1 + name: SWAG + token: ${UPTRACE_PROJECT_TOKEN} + +auth: + users: + - name: Anonymous + email: uptrace@localhost + password: uptrace diff --git a/uptrace/demo/__init__.py b/uptrace/demo/__init__.py index e447e51..b7d463a 100644 --- a/uptrace/demo/__init__.py +++ b/uptrace/demo/__init__.py @@ -12,10 +12,12 @@ def create_app() -> Flask: app.config.from_object('demo.settings.Config') app.config.from_prefixed_env() celery_init_app(app) - - # NOTE: Need to call instrument before mongoengine initialize. - PymongoInstrumentor().instrument() db.init_app(app) + + from . import endpoints + + app.register_blueprint(endpoints.app) + return app @@ -25,10 +27,6 @@ def __call__(self, *args: object, **kwargs: object) -> object: with app.app_context(): return self.run(*args, **kwargs) - @signals.worker_process_init.connect(weak=False) - def init_celery_tracing(*args, **kwargs): - CeleryInstrumentor().instrument() - celery_app = Celery(app.name, task_cls=FlaskTask) celery_app.config_from_object(app.config["CELERY"]) celery_app.set_default() diff --git a/uptrace/demo/endpoints/__init__.py b/uptrace/demo/endpoints/__init__.py index bbd9d45..31d321b 100644 --- a/uptrace/demo/endpoints/__init__.py +++ b/uptrace/demo/endpoints/__init__.py @@ -1,5 +1,4 @@ import random -import time from flask import Blueprint, request, make_response, Response @@ -42,23 +41,5 @@ def get_user_by_id(user_id: str): @app.route("/roll") -def toll_dice2(): +def roll(): return str(random.randint(1, 6)) - -@app.route("/roll-long") -def roll_dice(): - # counter.add(1) - rolled = random.randint(1, 6) - time.sleep(0.1 * rolled) - return str(rolled) - return str(do_roll()) - -# def do_roll(): -# with tracer.start_as_current_span("main") as rollspan: -# trace_id = rollspan.get_span_context().trace_id -# print(f"trace id: {trace_id:0{32}x}") -# res = randint(1, 6) -# rollspan.set_attribute("roll.value", res) -# # This adds 1 to the counter for the given roll value -# # roll_counter.add(1, {"roll.value": res}) -# return res diff --git a/uptrace/docker-compose.yaml b/uptrace/docker-compose.yaml index 6798bea..11c945d 100644 --- a/uptrace/docker-compose.yaml +++ b/uptrace/docker-compose.yaml @@ -1,92 +1,86 @@ version: '3' +x-environment: &env + OTEL_EXPORTER_OTLP_ENDPOINT: http://otelcol:4317 + POSTGRES_USER: uptrace + POSTGRES_PASSWORD: uptrace + POSTGRES_DB: uptrace + CLICKHOUSE_USER: uptrace + CLICKHOUST_PASSWORD: uptrace + CLICKHOUSE_DB: uptrace + UPTRACE_PROJECT_TOKEN: secret-token + OTEL_RESOURCE_ATTRIBUTES: 'deployment.environment=local' + OTEL_TRACES_SAMPLER: parentbased_traceidratio + OTEL_TRACES_SAMPLER_ARGS: '0.5' + services: - web: + api: build: . - # image: a901002666/opentelemetry:ubutu-python3.10 - # command : > - # opentelemetry-instrument - # --traces_exporter console,otlp - # --metrics_exporter console,otlp - # --logs_exporter console - # --service_name nino-flask-cli - # --exporter_otlp_endpoint http://otelcol:4317 - # flask run --host 0.0.0.0 -p 8001 --reload - # command: flask run --host 0.0.0.0 -p 8001 --reload - command: > - uwsgi - --single-interpreter - --enable-threads - --ini config/uwsgi.ini - --gevent 100 - --http 0.0.0.0:8001 + command: flask run --host 0.0.0.0 -p 8001 --reload + # command: > + # uwsgi + # --single-interpreter + # --enable-threads + # --ini config/uwsgi.ini + # --processes 16 + # --gevent 100 + # --http 0.0.0.0:8001 environment: - GRPC_DEFAULT_SSL_ROOTS_FILE_PATH: /etc/ssl/certs/ca-certificates.crt - # env_file: - # - .env + OTEL_SERVICE_NAME: api + <<: *env volumes: - .:/usr/src/app ports: - 8001:8001 clickhouse: image: clickhouse/clickhouse-server:22.10 - restart: on-failure environment: CLICKHOUSE_DB: uptrace + <<: *env healthcheck: test: ['CMD', 'wget', '--spider', '-q', 'localhost:8123/ping'] interval: 1s timeout: 1s retries: 30 volumes: - - ch_data7:/var/lib/clickhouse + - clicckhouse:/var/lib/clickhouse ports: - '8123:8123' - '9000:9000' postgres: image: postgres:15-alpine - restart: on-failure environment: PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_USER: uptrace - POSTGRES_PASSWORD: uptrace - POSTGRES_DB: uptrace - # healthcheck: - # test: ['CMD-SHELL', 'pg_isready', '-U', 'uptrace'] - # interval: 1s - # timeout: 1s - # retries: 30 + <<: *env + healthcheck: + test: ["CMD-SHELL", "pg_isready", "-U", "uptrace"] + interval: 1m + timeout: 1s + retries: 10 + start_period: 0s volumes: - - 'pg_data4:/var/lib/postgresql/data/pgdata' + - 'poasgres:/var/lib/postgresql/data/pgdata' ports: - '5432:5432' uptrace: - image: 'uptrace/uptrace:1.4.8' - #image: 'uptrace/uptrace-dev:latest' + image: 'uptrace/uptrace:1.5.2' restart: on-failure volumes: - - ./uptrace.yml:/etc/uptrace/uptrace.yml - - ./config:/usr/local/share/ca-certificates/ - # environment: - # - DEBUG=2 + - ./config/uptrace.yml:/etc/uptrace/uptrace.yml ports: - '14317:14317' - '14318:14318' - otelcol: - image: otel/opentelemetry-collector-contrib:0.77.0 - restart: on-failure - user: '0:0' # required for logs environment: - OTEL_EXPORTER_OTLP_ENDPOINT: uptrace:14317 - + <<: *env + depends_on: + - postgres + - clickhouse + otelcol: + image: otel/opentelemetry-collector-contrib:0.81.0 volumes: - - ./otel-collector.yaml:/etc/otelcol-contrib/config.yaml - - /var/lib/docker/containers:/var/lib/docker/containers:ro - - /var/log:/var/log:ro - ports: - - 4317:4317 - - 4318:4318 - - 8888:8888 + - ./config/otel-collector.yaml:/etc/otelcol-contrib/config.yaml + environment: + UPTRACE_DSN: "http://secret-token-swag@localhost:14317/1" mongo: image: mongo restart: always @@ -100,12 +94,13 @@ services: - 6379:6379 worker: build: . - command: celery -A app:celery_app worker --loglevel INFO - # command: sleep 1000 + command: celery -A app:celery_app worker -P gevent -c 10 --loglevel INFO volumes: - .:/usr/src/app + environment: + <<: *env volumes: - ch_data7: - pg_data4: + clicckhouse: + poasgres: mongo: diff --git a/uptrace/otel-collector.yaml b/uptrace/otel-collector.yaml deleted file mode 100644 index aed99e5..0000000 --- a/uptrace/otel-collector.yaml +++ /dev/null @@ -1,162 +0,0 @@ -receivers: - otlp: - protocols: - grpc: - endpoint: 0.0.0.0:4317 - http: - endpoint: 0.0.0.0:4318 - -processors: - resourcedetection: - detectors: [env, system] - cumulativetodelta: - batch: - send_batch_size: 10000 - timeout: 10s - -exporters: - otlphttp/uptrace: - endpoint: http://uptrace:14318 - tls: - insecure: true - headers: - uptrace-dsn: 'http://project2_secret_token@localhost:14318/2' - logging: - loglevel: debug - # verbosity: detailed - -service: - pipelines: - traces: - receivers: [otlp] - processors: [batch] - exporters: [otlphttp/uptrace, logging] - metrics: - receivers: [otlp] - processors: [cumulativetodelta, batch, resourcedetection] - exporters: [otlphttp/uptrace, logging] - logs: - receivers: [otlp] - processors: [batch] - exporters: [otlphttp/uptrace, logging] - -# ===== - -# extensions: -# health_check: -# pprof: -# endpoint: 0.0.0.0:1777 -# zpages: -# endpoint: 0.0.0.0:55679 - -# receivers: -# otlp: -# protocols: -# grpc: -# endpoint: 0.0.0.0:4317 -# http: -# endpoint: 0.0.0.0:4318 -# cors: -# allowed_origins: -# - http://* -# - https://* -# # hostmetrics: -# # collection_interval: 10s -# # scrapers: -# # cpu: -# # disk: -# # load: -# # filesystem: -# # memory: -# # network: -# # paging: -# jaeger: -# protocols: -# grpc: -# postgresql: -# endpoint: postgres:5432 -# transport: tcp -# username: uptrace -# password: uptrace -# databases: -# - uptrace -# tls: -# insecure: true -# prometheus/otelcol: -# config: -# scrape_configs: -# - job_name: 'otelcol' -# scrape_interval: 10s -# static_configs: -# - targets: ['0.0.0.0:8888'] - -# processors: -# resourcedetection: -# detectors: ['system'] -# batch: -# send_batch_size: 10000 -# timeout: 10s - -# exporters: -# logging: -# loglevel: debug -# # verbosity: detailed -# otlphttp/uptrace: -# endpoint: http://uptrace:14317 -# tls: -# insecure: true -# headers: -# uptrace-dsn: 'https://project2_secret_token@localhost:14317/2' -# otlp/uptrace: -# endpoint: http://uptrace:14317 -# tls: -# insecure: true -# headers: -# uptrace-dsn: 'https://project2_secret_token@localhost:14317/2' - - -# service: -# telemetry: -# logs: -# level: "debug" -# pipelines: -# traces: -# receivers: [otlp] -# # processors: [batch] -# exporters: [otlp/uptrace, logging] -# metrics: -# receivers: [otlp] -# # processors: [cumulativetodelta, batch, resourcedetection] -# exporters: [otlp/uptrace, logging] -# logs: -# receivers: [otlp] -# # processors: [batch] -# exporters: [otlp/uptrace, logging] - -# ====== - -# service: -# telemetry: -# metrics: -# address: ':8888' -# # logs: -# # level: DEBUG -# pipelines: -# traces: -# receivers: [otlp, jaeger] -# # processors: [batch] -# exporters: [otlphttp/uptrace, logging] -# metrics: -# receivers: [otlp] -# # processors: [batch] -# exporters: [otlphttp/uptrace] -# # metrics/hostmetrics: -# # receivers: [hostmetrics, postgresql, prometheus/otelcol] -# # processors: [batch, resourcedetection] -# # exporters: [otlp/uptrace] -# logs: -# receivers: [otlp] -# # processors: [batch] -# exporters: [otlphttp/uptrace] - -# extensions: [health_check, pprof, zpages] diff --git a/uptrace/uptrace.yml b/uptrace/uptrace.yml deleted file mode 100644 index 0e4aba4..0000000 --- a/uptrace/uptrace.yml +++ /dev/null @@ -1,263 +0,0 @@ -## -## Uptrace configuration file. -## See https://uptrace.dev/get/config.html for details. -## -## You can use environment variables anywhere in this file, for example: -## -## foo: $FOO -## bar: ${BAR} -## baz: ${BAZ:default} -## -## To escape `$`, use `$$`, for example: -## -## foo: $$FOO_BAR -## - -## -## ClickHouse database credentials. -## -ch: - addr: clickhouse:9000 - user: default - password: - database: uptrace - - # TLS configuration. Uncomment to enable. - # tls: - # insecure_skip_verify: true - - # Maximum query execution time. - max_execution_time: 30s - -## -## PostgreSQL db that is used to store metadata such us metric names, dashboards, alerts, -## and so on. -## -pg: - addr: postgres:5432 - user: uptrace - password: uptrace - database: uptrace - - # TLS configuration. Uncomment to enable. - # tls: - # insecure_skip_verify: true # only for self-signed certificates - -## -## A list of pre-configured projects. Each project is fully isolated. -## -projects: - # Conventionally, the first project is used to monitor Uptrace itself. - - id: 1 - name: Uptrace - # Token grants write access to the project. Keep a secret. - token: project1_secret_token - pinned_attrs: - - service - - host.name - - deployment.environment - # Group spans by deployment.environment attribute. - group_by_env: false - # Group funcs spans by service.name attribute. - group_funcs_by_service: false - - # Other projects can be used to monitor your applications. - # To monitor micro-services or multiple related services, use a single project. - - id: 2 - name: My project - token: project2_secret_token - pinned_attrs: - - service - - host.name - - deployment.environment - # Group spans by deployment.environment attribute. - group_by_env: false - # Group funcs spans by service.name attribute. - group_funcs_by_service: false - -## -## Create metrics from spans and events. -## -metrics_from_spans: - - name: uptrace.tracing.spans - description: Spans duration (excluding events) - instrument: histogram - unit: microseconds - value: span.duration / 1000 - attrs: - - span.system - - span.group_id - - service.name - - host.name - - span.status_code - annotations: - - span.name - where: not span.is_event - - - name: uptrace.tracing.events - description: Events count (excluding spans) - instrument: counter - unit: 1 - value: span.count - attrs: - - span.system - - span.group_id - - service.name - - host.name - annotations: - - span.event_name - where: span.is_event - -## -## To require authentication, uncomment one of the following sections. -## -auth: - users: - - name: Anonymous - email: uptrace@localhost - password: uptrace - notify_by_email: true - - # Cloudflare Zero Trust Access (Identity) - # See https://developers.cloudflare.com/cloudflare-one/identity/ for more info. - # cloudflare: - # # The base URL of the Cloudflare Zero Trust team. - # - team_url: https://myteam.cloudflareaccess.com - # # The Application Audience (AUD) Tag for this application. - # # You can retrieve this from the Cloudflare Zero Trust 'Access' Dashboard. - # audience: bea6df23b944e4a0cd178609ba1bb64dc98dfe1f66ae7b918e563f6cf28b37e0 - - # OpenID Connect (Single Sign-On) - oidc: - # # The ID is used in API endpoints, for example, in redirect URL - # # `http:///api/v1/sso//callback`. - # - id: keycloak - # # Display name for the button in the login form. - # # Default to 'OpenID Connect' - # display_name: Keycloak - # # The base URL for the OIDC provider. - # issuer_url: http://localhost:8080/realms/uptrace - # # The OAuth 2.0 Client ID - # client_id: uptrace - # # The OAuth 2.0 Client Secret - # client_secret: ogbhd8Q0X0e5AZFGSG3m9oirPvnetqkA - # # Additional OAuth 2.0 scopes to request from the OIDC provider. - # # Defaults to 'profile'. 'openid' is requested by default and need not be specified. - # scopes: - # - profile - -## -## Various options to tweak ClickHouse schema. -## For changes to take effect, you need reset the ClickHouse database with `ch reset`. -## -ch_schema: - # Compression codec, for example, LZ4, ZSTD(3), or Default. - compression: ZSTD(3) - - # Whether to use ReplicatedMergeTree instead of MergeTree. - replicated: false - - # Cluster name for Distributed tables and ON CLUSTER clause. - #cluster: uptrace1 - - spans: - # Delete spans data after 30 days. - ttl_delete: 30 DAY - storage_policy: 'default' - - metrics: - # Delete metrics data after 90 days. - ttl_delete: 90 DAY - storage_policy: 'default' - -## -## Addresses on which Uptrace receives gRPC and HTTP requests. -## -listen: - # OTLP/gRPC API. - grpc: - addr: ':14317' - # tls: - # cert_file: /usr/local/share/ca-certificates//uptrace.crt - # key_file: /usr/local/share/ca-certificates//uptrace.key - - # OTLP/HTTP API and Uptrace API with UI. - http: - addr: ':14318' - # tls: - # cert_file: /usr/local/share/ca-certificates//uptrace.crt - # key_file: /usr/local/share/ca-certificates//uptrace.key - -## -## Various options for Uptrace UI. -## -site: - # Overrides public URL for Vue-powered UI in case you put Uptrace behind a proxy. - #addr: 'https://uptrace.mydomain.com' - # The base path for the Vue-powered UI in case you serve Uptrace UI behind a sub path. - path: '/' - -## -## Spans processing options. -## -spans: - # The size of the Go chan used to buffer incoming spans. - # If the buffer is full, Uptrace starts to drop spans. - #buffer_size: 100000 - - # The number of spans to insert in a single query. - #batch_size: 10000 - -## -## Metrics processing options. -## -metrics: - # List of attributes to drop for being noisy. - drop_attrs: - - telemetry.sdk.language - - telemetry.sdk.name - - telemetry.sdk.version - - # The size of the Go chan used to buffer incoming measures. - # If the buffer is full, Uptrace starts to drop measures. - #buffer_size: 100000 - - # The number of measures to insert in a single query. - #batch_size: 10000 - -## -## uptrace-go client configuration. -## Uptrace sends internal telemetry here. Defaults to listen.grpc.addr. -## -uptrace_go: - # dsn: http://project1_secret_token@localhost:14317/1 - # tls: - # cert_file: config/tls/uptrace.crt - # key_file: config/tls/uptrace.key - # insecure_skip_verify: true - -## -## SMTP settings to send emails. -## https://uptrace.dev/get/alerting.html -## -smtp_mailer: - enabled: true - host: mailhog - port: 1025 - username: mailhog - password: mailhog - from: 'uptrace@localhost' - -## -## Logging configuration. -## -logs: - # Zap minimal logging level. - # Valid values: DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, FATAL. - level: INFO - -# Secret key that is used to sign JWT tokens etc. -secret_key: 102c1a557c314fc28198acd017960843 - -# Enable to log HTTP requests and database queries. -debug: false