You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/__init__.py
+6-4
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@
28
28
.. code:: python
29
29
30
30
from opentelemetry.instrumentation.botocore import BotocoreInstrumentor
Copy file name to clipboardExpand all lines: instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/__init__.py
+10-5
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,9 @@
34
34
# report a span of type consumer with the default settings
Copy file name to clipboardExpand all lines: instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/__init__.py
+8-5
Original file line number
Diff line number
Diff line change
@@ -32,15 +32,15 @@
32
32
33
33
from opentelemetry.instrumentation.elasticsearch import ElasticsearchInstrumentor
34
34
import elasticsearch
35
-
35
+
from datetime import datetime
36
36
37
37
# instrument elasticsearch
38
38
ElasticsearchInstrumentor().instrument()
39
39
40
40
# Using elasticsearch as normal now will automatically generate spans
from opentelemetry.instrumentation.falcon import FalconInstrumentor
57
+
58
+
FalconInstrumentor().instrument()
59
+
60
+
app = falcon.App()
61
+
62
+
classHelloWorldResource(object):
63
+
defon_get(self, req, resp):
64
+
resp.text ='Hello World'
65
+
66
+
app.add_route('/hello', HelloWorldResource())
67
+
50
68
51
69
Request/Response hooks
52
70
**********************
53
71
The instrumentation supports specifying request and response hooks. These are functions that get called back by the instrumentation right after a Span is created for a request
54
72
and right before the span is finished while processing a response. The hooks can be configured as follows:
55
73
56
-
::
74
+
.. code-block:: python
75
+
76
+
from opentelemetry.instrumentation.falcon import FalconInstrumentor
Copy file name to clipboardExpand all lines: instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/__init__.py
0 commit comments