Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Rename flask_util pkg to flask #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import opentelemetry.ext.http_requests
from opentelemetry import propagators, trace
from opentelemetry.ext.flask_util import instrument_app
from opentelemetry.ext.flask import instrument_app
from opentelemetry.sdk.context.propagation.b3_format import B3Format
from opentelemetry.sdk.trace import Tracer

Expand Down
2 changes: 1 addition & 1 deletion ext/opentelemetry-ext-flask/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Usage
.. code-block:: python

from flask import Flask
from opentelemetry.ext.flask_util import instrument_app
from opentelemetry.ext.flask import instrument_app

app = Flask(__name__)
instrument_app(app) # This is where the magic happens. ✨
Expand Down
2 changes: 1 addition & 1 deletion ext/opentelemetry-ext-flask/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

BASE_DIR = os.path.dirname(__file__)
VERSION_FILENAME = os.path.join(
BASE_DIR, "src", "opentelemetry", "ext", "flask_util", "version.py"
BASE_DIR, "src", "opentelemetry", "ext", "flask", "version.py"
)
PACKAGE_INFO = {}
with open(VERSION_FILENAME) as f:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
# Note: This package is not named "flask" because of
# https://github.com/PyCQA/pylint/issues/2648
# Copyright 2019, OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# See https://github.com/PyCQA/pylint/issues/2648
# pylint: disable=import-self

import logging

from flask import request as flask_request
from flask import request as flask_request # pylint: disable=no-name-in-module

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even when suppressing this error, it also means that pylint won't be able to do any checks whether some attribute exists on flask_request. But given that I also really don't like flask_util as package name, I'm inclined to accept that shortcoming.


import opentelemetry.ext.wsgi as otel_wsgi
from opentelemetry import propagators, trace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from werkzeug.test import Client
from werkzeug.wrappers import BaseResponse

import opentelemetry.ext.flask_util as otel_flask
import opentelemetry.ext.flask as otel_flask
from opentelemetry import trace as trace_api
from wsgitestutil import WsgiTestBase

Expand Down