Skip to content

Commit

Permalink
update opentelemetry reqs; unfreeze requests version (#234)
Browse files Browse the repository at this point in the history
Remove unnecessary dependencies, remove version restrictions.

Remove exporter patch, add version restriction for new opentelemetry api.

---------

Co-authored-by: Roman Zlobin <[email protected]>
  • Loading branch information
ruthenian8 and RLKRo authored Sep 26, 2023
1 parent d247a58 commit 82aff11
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 56 deletions.
1 change: 0 additions & 1 deletion dff/stats/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
# flake8: noqa: F401

from . import exporter_patch
from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanExporter
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
from opentelemetry.sdk._logs.export import InMemoryLogExporter, ConsoleLogExporter
Expand Down
37 changes: 0 additions & 37 deletions dff/stats/exporter_patch.py

This file was deleted.

1 change: 0 additions & 1 deletion dff/stats/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from argparse import Namespace, Action

import requests
from . import exporter_patch # noqa: F401
from opentelemetry.sdk.resources import Resource
from opentelemetry._logs import get_logger_provider, set_logger_provider
from opentelemetry.trace import get_tracer_provider, set_tracer_provider
Expand Down
27 changes: 10 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,18 @@ def merge_req_lists(*req_lists: List[str]) -> List[str]:
"pytelegrambotapi",
]

requests_requirements = [
"requests==2.31.0",
]

otl_dependencies = [
"opentelemetry-api==1.17.0",
"opentelemetry-exporter-otlp==1.17.0",
"opentelemetry-exporter-otlp-proto-grpc==1.17.0",
"opentelemetry-exporter-otlp-proto-http==1.17.0",
"opentelemetry-instrumentation==0.38b0",
"opentelemetry-proto==1.17.0",
"opentelemetry-sdk==1.17.0",
"opentelemetry-semantic-conventions==0.38b0",
"opentelemetry-exporter-otlp>=1.20.0", # log body serialization is required
"opentelemetry-instrumentation",
]

stats_dependencies = merge_req_lists(
_sql_dependencies,
requests_requirements,
otl_dependencies,
[
"wrapt==1.15.0",
"tqdm==4.62.3",
"omegaconf>=2.2.2",
"requests",
"wrapt",
"tqdm",
"omegaconf",
],
)

Expand All @@ -118,6 +107,10 @@ def merge_req_lists(*req_lists: List[str]) -> List[str]:
telegram_dependencies,
)

requests_requirements = [
"requests==2.31.0",
]

test_requirements = merge_req_lists(
[
"pytest==7.4.0",
Expand Down

0 comments on commit 82aff11

Please sign in to comment.