-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from jeremydvoss/instrumentations-minus-django
Adding instrumentations aside from django
- Loading branch information
Showing
5 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import unittest | ||
|
||
from opentelemetry.instrumentation.flask import FlaskInstrumentor | ||
|
||
|
||
class TestFlaskInstrumentation(unittest.TestCase): | ||
def test_instrument(self): | ||
excluded_urls = "client/.*/info,healthcheck" | ||
try: | ||
FlaskInstrumentor().instrument(excluded_urls=excluded_urls) | ||
except Exception as ex: # pylint: disable=broad-except | ||
print(ex) | ||
self.fail( | ||
f"Unexpected exception raised when instrumenting {FlaskInstrumentor.__name__}" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import unittest | ||
|
||
from opentelemetry.instrumentation.psycopg2 import Psycopg2Instrumentor | ||
|
||
|
||
class TestPsycopg2Instrumentation(unittest.TestCase): | ||
def test_instrument(self): | ||
try: | ||
Psycopg2Instrumentor().instrument() | ||
except Exception as ex: # pylint: disable=broad-except | ||
print(ex) | ||
self.fail( | ||
f"Unexpected exception raised when instrumenting {Psycopg2Instrumentor.__name__}" | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import unittest | ||
|
||
from opentelemetry.instrumentation.requests import RequestsInstrumentor | ||
|
||
|
||
class TestRequestsInstrumentation(unittest.TestCase): | ||
def test_instrument(self): | ||
try: | ||
RequestsInstrumentor().instrument() | ||
except Exception as ex: # pylint: disable=broad-except | ||
print(ex) | ||
self.fail( | ||
f"Unexpected exception raised when instrumenting {RequestsInstrumentor.__name__}" | ||
) | ||
|