monocle-apptrace 0.1.1__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of monocle-apptrace might be problematic. Click here for more details.

Files changed (37) hide show
  1. monocle_apptrace/exporters/aws/s3_exporter.py +158 -0
  2. monocle_apptrace/exporters/azure/blob_exporter.py +128 -0
  3. monocle_apptrace/exporters/base_exporter.py +47 -0
  4. monocle_apptrace/exporters/exporter_processor.py +19 -0
  5. monocle_apptrace/exporters/monocle_exporters.py +27 -0
  6. monocle_apptrace/exporters/okahu/okahu_exporter.py +115 -0
  7. monocle_apptrace/haystack/__init__.py +4 -4
  8. monocle_apptrace/haystack/wrap_pipeline.py +3 -2
  9. monocle_apptrace/instrumentor.py +12 -15
  10. monocle_apptrace/langchain/__init__.py +6 -3
  11. monocle_apptrace/llamaindex/__init__.py +8 -7
  12. monocle_apptrace/metamodel/entities/README.md +33 -10
  13. monocle_apptrace/metamodel/entities/app_hosting_types.json +29 -0
  14. monocle_apptrace/metamodel/entities/entities.json +49 -0
  15. monocle_apptrace/metamodel/entities/inference_types.json +33 -0
  16. monocle_apptrace/metamodel/entities/model_types.json +41 -0
  17. monocle_apptrace/metamodel/entities/vector_store_types.json +25 -0
  18. monocle_apptrace/metamodel/entities/workflow_types.json +22 -0
  19. monocle_apptrace/metamodel/maps/attributes/inference/langchain_entities.json +35 -0
  20. monocle_apptrace/metamodel/maps/attributes/inference/llamaindex_entities.json +35 -0
  21. monocle_apptrace/metamodel/maps/attributes/retrieval/langchain_entities.json +27 -0
  22. monocle_apptrace/metamodel/maps/attributes/retrieval/llamaindex_entities.json +27 -0
  23. monocle_apptrace/metamodel/maps/{lang_chain_methods.json → langchain_methods.json} +31 -8
  24. monocle_apptrace/metamodel/maps/{llama_index_methods.json → llamaindex_methods.json} +12 -8
  25. monocle_apptrace/metamodel/spans/span_example.json +1 -1
  26. monocle_apptrace/metamodel/spans/span_types.json +16 -0
  27. monocle_apptrace/utils.py +90 -11
  28. monocle_apptrace/wrap_common.py +228 -122
  29. monocle_apptrace/wrapper.py +3 -1
  30. {monocle_apptrace-0.1.1.dist-info → monocle_apptrace-0.2.0.dist-info}/METADATA +5 -1
  31. monocle_apptrace-0.2.0.dist-info/RECORD +44 -0
  32. monocle_apptrace/metamodel/entities/entity_types.json +0 -157
  33. monocle_apptrace/metamodel/entities/entity_types.py +0 -51
  34. monocle_apptrace-0.1.1.dist-info/RECORD +0 -29
  35. {monocle_apptrace-0.1.1.dist-info → monocle_apptrace-0.2.0.dist-info}/WHEEL +0 -0
  36. {monocle_apptrace-0.1.1.dist-info → monocle_apptrace-0.2.0.dist-info}/licenses/LICENSE +0 -0
  37. {monocle_apptrace-0.1.1.dist-info → monocle_apptrace-0.2.0.dist-info}/licenses/NOTICE +0 -0
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  from monocle_apptrace.haystack import HAYSTACK_METHODS
4
3
  from monocle_apptrace.langchain import LANGCHAIN_METHODS
5
4
  from monocle_apptrace.llamaindex import LLAMAINDEX_METHODS
@@ -13,12 +12,15 @@ class WrapperMethod:
13
12
  object_name: str,
14
13
  method: str,
15
14
  span_name: str = None,
15
+ output_processor : list[str] = None,
16
16
  wrapper = task_wrapper
17
17
  ):
18
18
  self.package = package
19
19
  self.object = object_name
20
20
  self.method = method
21
21
  self.span_name = span_name
22
+ self.output_processor=output_processor
23
+
22
24
  self.wrapper = wrapper
23
25
 
24
26
  INBUILT_METHODS_LIST = LANGCHAIN_METHODS + LLAMAINDEX_METHODS + HAYSTACK_METHODS
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: monocle_apptrace
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: package with monocle genAI tracing
5
5
  Project-URL: Homepage, https://github.com/monocle2ai/monocle
6
6
  Project-URL: Issues, https://github.com/monocle2ai/monocle/issues
@@ -15,6 +15,10 @@ Requires-Dist: opentelemetry-instrumentation
15
15
  Requires-Dist: opentelemetry-sdk>=1.21.0
16
16
  Requires-Dist: requests
17
17
  Requires-Dist: wrapt>=1.14.0
18
+ Provides-Extra: aws
19
+ Requires-Dist: boto3==1.35.19; extra == 'aws'
20
+ Provides-Extra: azure
21
+ Requires-Dist: azure-storage-blob==12.22.0; extra == 'azure'
18
22
  Provides-Extra: dev
19
23
  Requires-Dist: datasets==2.20.0; extra == 'dev'
20
24
  Requires-Dist: faiss-cpu==1.8.0; extra == 'dev'
@@ -0,0 +1,44 @@
1
+ monocle_apptrace/README.md,sha256=T5NFC01bF8VR0oVnAX_n0bhsEtttwqfTxDNAe5Y_ivE,3765
2
+ monocle_apptrace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ monocle_apptrace/constants.py,sha256=wjObbmMTFL201x-bf3EOXevYygwkFH_1ng5dDrpE3z0,810
4
+ monocle_apptrace/instrumentor.py,sha256=FMQ8yVNYGRBTmyUjC2578G8RzSRpHY5HtVN5WK9ndVE,5291
5
+ monocle_apptrace/utils.py,sha256=l-affXaMX6U_wG1rWRE2GPB6dDGtha7kL0MQK4PEptI,6395
6
+ monocle_apptrace/wrap_common.py,sha256=ux2Ob7g1FYDtt1gF4g8XKQhl6Ed5X_iR4CP4GHX4upM,18178
7
+ monocle_apptrace/wrapper.py,sha256=8bsMaCCCbaEJN8hW5YoYkn2XLJ7vFI1HJk6QHihbkto,830
8
+ monocle_apptrace/exporters/base_exporter.py,sha256=1UvywEiKZ0nilcXiy-mZue012yVvYXgwib1x1qQvpBc,1647
9
+ monocle_apptrace/exporters/exporter_processor.py,sha256=BTcBgMuFLHCdCgVvc9TKIo9y8g1BvShI0L4vX6Q-cmk,393
10
+ monocle_apptrace/exporters/file_exporter.py,sha256=gN9pJ_X5pcstVVsyivgHsjWhr443eRa6Y6Hx1rGLQAM,2280
11
+ monocle_apptrace/exporters/monocle_exporters.py,sha256=mvVoGr4itvUBuakH17zNEuXYpHtqRhq2CBH5JXhleoM,1418
12
+ monocle_apptrace/exporters/aws/s3_exporter.py,sha256=S_w2OBkM8eEYK6bBDbfcRV4LdojU1QygOBqjdhcjAl4,6730
13
+ monocle_apptrace/exporters/azure/blob_exporter.py,sha256=dtL8MPISyP1eKM0gGpSoqTUmFuGEfycqF9OCjFF6H6E,5716
14
+ monocle_apptrace/exporters/okahu/okahu_exporter.py,sha256=p2rjStwo0OMEdHWQt_QvREpUWXbDm5jGx3qXeYai4_M,4407
15
+ monocle_apptrace/haystack/__init__.py,sha256=zMvF6Dh1-vVIAQD__HC1ubT5bs-EupUghg7HNhDv7_c,448
16
+ monocle_apptrace/haystack/wrap_node.py,sha256=IK07Wn3Lk1Os9URsyrmB1HXOH2FNdzK9fNLlR8TZdYc,908
17
+ monocle_apptrace/haystack/wrap_openai.py,sha256=Yp916DhOl0WI6virRi3L43snfsQm7PhI28wlDsg19v8,1536
18
+ monocle_apptrace/haystack/wrap_pipeline.py,sha256=yZAw7Hdv7FXe6rrM7gA2y5SjaZYQZCAi0q-R-uqUEvk,2254
19
+ monocle_apptrace/langchain/__init__.py,sha256=3yhbdw1h9I1nVEfnOOPKz9yD5NqwdLSZsxtXbMplRkw,400
20
+ monocle_apptrace/llamaindex/__init__.py,sha256=TgV1ZM8Cz113pZ2aAgpYwsCJyHA2aHOvNoW1QMBp0mM,709
21
+ monocle_apptrace/metamodel/README.md,sha256=KYuuYqgA9PNbOjG0zYj2nAdvNEpyNN_Bk9M2tNdnZ_s,4598
22
+ monocle_apptrace/metamodel/entities/README.md,sha256=dY7Q8QT_Ju-2ul65J-k0x6beDLvRirlbGufZN1Q0tpk,2068
23
+ monocle_apptrace/metamodel/entities/app_hosting_types.json,sha256=MWeHUe77n4HvO1hm2PX8iWjbRONBuNy2I84vd-lymYk,568
24
+ monocle_apptrace/metamodel/entities/entities.json,sha256=6eDoDm_6aPUgH_ROjI2H9Tk3J5Lj55VkX3Li-TJmaxg,1285
25
+ monocle_apptrace/metamodel/entities/inference_types.json,sha256=Gkq7qNw5Qn91tuq-rBxHJ4BSzT-etCshNjT5_G4Bg8I,651
26
+ monocle_apptrace/metamodel/entities/model_types.json,sha256=Oz9DzuX_ptpLEVTc1Epv4_Y80TrYxR7cyc9kM0Zk780,785
27
+ monocle_apptrace/metamodel/entities/vector_store_types.json,sha256=EA0KayHMOG7wMIkec54en03_3yT1qpdGh5TiDrAoh4g,462
28
+ monocle_apptrace/metamodel/entities/workflow_types.json,sha256=eD0W3_FocKrzrrW0bks0hIJb9Kj7w8c1dpXzxmGLOwk,386
29
+ monocle_apptrace/metamodel/maps/haystack_methods.json,sha256=JmngkaKICAzOyrWNTWEOLYFrp99l5wcERYKE_SQRNxE,698
30
+ monocle_apptrace/metamodel/maps/langchain_methods.json,sha256=lfU8nd6td5qzTI01glM063Vg0UoZM9HGPirwN4OZcKc,4285
31
+ monocle_apptrace/metamodel/maps/llamaindex_methods.json,sha256=pZ4d1DS4D6Wgpz9EBOrEuJUFN58jtu75E8ELyGRBHyM,2636
32
+ monocle_apptrace/metamodel/maps/attributes/inference/langchain_entities.json,sha256=E_K3eHv_e9Va2AcjNLHcXeAgePB1uolTMdRnkxxtNqU,1152
33
+ monocle_apptrace/metamodel/maps/attributes/inference/llamaindex_entities.json,sha256=LuAa9ZKl3mO2VUiXMVGZNEfSHOZ0n5qsVQLqWRHczVM,1122
34
+ monocle_apptrace/metamodel/maps/attributes/retrieval/langchain_entities.json,sha256=vSe2kbeJ7izmj5TBdQpX5pJ3hbjdY4SkcXvWPiam7oo,718
35
+ monocle_apptrace/metamodel/maps/attributes/retrieval/llamaindex_entities.json,sha256=BtWeSXUPzKR9-vuhZUUhn2Gz9Y4SXBZoFC81K1q0XwQ,712
36
+ monocle_apptrace/metamodel/spans/README.md,sha256=_uMkLLaWitQ_rPh7oQbW5Oe7uGSv2h_QA6YwxHRJi74,5433
37
+ monocle_apptrace/metamodel/spans/span_example.json,sha256=7ZAUssL1UYXlbKHre8PfeNlIhHnM28e2CH9EyHDTOt8,4402
38
+ monocle_apptrace/metamodel/spans/span_format.json,sha256=GhfioGgMhG7St0DeYA1fgNtMkbr9wiQ1L2hovekRQ24,1512
39
+ monocle_apptrace/metamodel/spans/span_types.json,sha256=jwVyPbYMhEf2Ea6Egmb3m1Za28ap9dgZIpJDhdE1BlY,361
40
+ monocle_apptrace-0.2.0.dist-info/METADATA,sha256=zaIOrJwa-RLX1bWeBEfTCfeBGC2cuNeXKwPHAYYNRT8,5364
41
+ monocle_apptrace-0.2.0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
42
+ monocle_apptrace-0.2.0.dist-info/licenses/LICENSE,sha256=ay9trLiP5I7ZsFXo6AqtkLYdRqe5S9r-DrPOvsNlZrg,9136
43
+ monocle_apptrace-0.2.0.dist-info/licenses/NOTICE,sha256=9jn4xtwM_uUetJMx5WqGnhrR7MIhpoRlpokjSTlyt8c,112
44
+ monocle_apptrace-0.2.0.dist-info/RECORD,,
@@ -1,157 +0,0 @@
1
- {
2
- "description": "Monocle entities represents kinds GenAI technology components and their implementations supported by Monocle",
3
- "monocle_entities": [
4
- {
5
- "attributes" : [
6
- {
7
- "attribute_name": "name",
8
- "attribute_description": "Monocle entity name",
9
- "required": true
10
- },
11
- {
12
- "attribute_name": "type",
13
- "attribute_description": "Monocle entity type",
14
- "required": true
15
- }
16
- ],
17
- "entities": [
18
- {
19
- "name": "workflow",
20
- "attributes" : [],
21
- "types": [
22
- {
23
- "type": "llama_index",
24
- "attributes" : []
25
- },
26
- {
27
- "type": "langchain",
28
- "attributes" : []
29
- },
30
- {
31
- "type": "haystack",
32
- "attributes" : []
33
- },
34
- {
35
- "type": "generic",
36
- "attributes" : []
37
- }
38
- ]
39
- },
40
- {
41
- "name": "model",
42
- "attributes" : [
43
- {
44
- "attribute_name": "model_name",
45
- "attribute_description": "Model name",
46
- "required": true
47
- }
48
- ],
49
- "types": [
50
- {
51
- "type": "llm",
52
- "attributes" : []
53
- },
54
- {
55
- "type": "embedding",
56
- "attributes" : []
57
- },
58
- {
59
- "type": "generic",
60
- "attributes" : []
61
- }
62
- ]
63
- },
64
- {
65
- "name": "vector_store",
66
- "attributes" : [],
67
- "types": [
68
- {
69
- "type": "chroma",
70
- "attributes" : []
71
- },
72
- {
73
- "type": "aws_es",
74
- "attributes" : []
75
- },
76
- {
77
- "type": "milvus",
78
- "attributes" : []
79
- },
80
- {
81
- "type": "pinecone",
82
- "attributes" : []
83
- },
84
- {
85
- "type": "generic",
86
- "attributes" : []
87
- }
88
- ]
89
- },
90
- {
91
- "name": "app_hosting",
92
- "attributes" : [],
93
- "types": [
94
- {
95
- "type": "aws_lambda",
96
- "attributes" : []
97
- },
98
- {
99
- "type": "aws_sagemaker",
100
- "attributes" : []
101
- },
102
- {
103
- "type": "azure_func",
104
- "attributes" : []
105
- },
106
- {
107
- "type": "azure_mlw",
108
- "attributes" : []
109
- },
110
- {
111
- "type": "github_codespace",
112
- "attributes" : []
113
- },
114
- {
115
- "type": "generic",
116
- "attributes" : []
117
- }
118
- ]
119
- },
120
- {
121
- "name": "inference",
122
- "attributes" : [],
123
- "types": [
124
- {
125
- "type": "aws_sagemaker",
126
- "attributes" : []
127
- },
128
- {
129
- "type": "aws_bedrock",
130
- "attributes" : []
131
- },
132
- {
133
- "type": "azure_oai",
134
- "attributes" : []
135
- },
136
- {
137
- "type": "openai",
138
- "attributes" : []
139
- },
140
- {
141
- "type": "nvidia_triton",
142
- "attributes" : []
143
- },
144
- {
145
- "type": "hugging_face",
146
- "attributes" : []
147
- },
148
- {
149
- "type": "generic",
150
- "attributes" : []
151
- }
152
- ]
153
- }
154
- ]
155
- }
156
- ]
157
- }
@@ -1,51 +0,0 @@
1
- # Monocle meta model:
2
- # Monocle Entities --> Entity Type --> Entity
3
-
4
- import enum
5
-
6
- class MonocleEntity(enum):
7
- # Supported Workflow/language frameworks
8
- class Workflow(enum):
9
- generic = 0
10
- langchain = 1
11
- llama_index = 2
12
- haystack = 3
13
-
14
- # Supported model types
15
- class Model(enum):
16
- generic = 0
17
- llm = 1
18
- embedding = 2
19
-
20
- # Support Vector databases
21
- class VectorStore(enum):
22
- generic = 0
23
- chroma = 1
24
- aws_es = 2
25
- Milvus = 3
26
- Pinecone = 4
27
-
28
- # Support application hosting frameworks
29
- class AppHosting(enum):
30
- generic = 0
31
- aws_lambda = 1
32
- aws_sagemaker = 2
33
- azure_func = 3
34
- github_codespace = 4
35
- azure_mlw = 5
36
-
37
- # Supported inference infra/services
38
- class Inference(enum):
39
- generic = 0
40
- nvidia_triton = 1
41
- openai = 2
42
- azure_oai = 3
43
- aws_sagemaker = 4
44
- aws_bedrock = 5
45
- hugging_face = 6
46
-
47
- class SpanType(enum):
48
- internal = 0
49
- retrieval = 2
50
- inference = 3
51
- workflow = 4
@@ -1,29 +0,0 @@
1
- monocle_apptrace/README.md,sha256=T5NFC01bF8VR0oVnAX_n0bhsEtttwqfTxDNAe5Y_ivE,3765
2
- monocle_apptrace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- monocle_apptrace/constants.py,sha256=wjObbmMTFL201x-bf3EOXevYygwkFH_1ng5dDrpE3z0,810
4
- monocle_apptrace/instrumentor.py,sha256=txKj7tZaXY0gznc8QVOyMI-LA5r7tfSPJkleZPI1fWQ,5051
5
- monocle_apptrace/utils.py,sha256=l3FAVF0rFbsph1LFdTMcs7K5ASiaovRQBmBeFYEHZmU,3174
6
- monocle_apptrace/wrap_common.py,sha256=rhiY2PE2WoLYofbby3LioTSjFG8YrMlhUnc82yXRkFk,12612
7
- monocle_apptrace/wrapper.py,sha256=cNUdfciAXNYAhvtOA2O4ONRvuT2bbHb4ax_7pALijEI,734
8
- monocle_apptrace/exporters/file_exporter.py,sha256=gN9pJ_X5pcstVVsyivgHsjWhr443eRa6Y6Hx1rGLQAM,2280
9
- monocle_apptrace/haystack/__init__.py,sha256=95LGUcUZbOcX5h-NwNrquKycp-qhuwCmcMfWAwxGylQ,321
10
- monocle_apptrace/haystack/wrap_node.py,sha256=IK07Wn3Lk1Os9URsyrmB1HXOH2FNdzK9fNLlR8TZdYc,908
11
- monocle_apptrace/haystack/wrap_openai.py,sha256=Yp916DhOl0WI6virRi3L43snfsQm7PhI28wlDsg19v8,1536
12
- monocle_apptrace/haystack/wrap_pipeline.py,sha256=1bufscslUpjbSw_kVl24rngTMsiGV33oCKbTxwtWM6Q,2173
13
- monocle_apptrace/langchain/__init__.py,sha256=3ABxFk92mmRj67Y3z70leZ4j1ig9Z6OU--rtxzfNIIM,271
14
- monocle_apptrace/llamaindex/__init__.py,sha256=lr-rdprhXJdSt-Fp1LghW-hMxWgDN6lPFTQgyqnb7N0,573
15
- monocle_apptrace/metamodel/README.md,sha256=KYuuYqgA9PNbOjG0zYj2nAdvNEpyNN_Bk9M2tNdnZ_s,4598
16
- monocle_apptrace/metamodel/entities/README.md,sha256=ZE8PYne9F8xN4uu0CB1BOS8iM5QdKdpQjHuqCaw7Vkg,1553
17
- monocle_apptrace/metamodel/entities/entity_types.json,sha256=-J1ZbzrZny1c9HSQKwRZu2Un3c0JjX9FvsfHwlZvaaw,5435
18
- monocle_apptrace/metamodel/entities/entity_types.py,sha256=4CzobOm692tou1Tsv8YX_yrOhhnwMBF8hBAt1Czn_8Q,1076
19
- monocle_apptrace/metamodel/maps/haystack_methods.json,sha256=JmngkaKICAzOyrWNTWEOLYFrp99l5wcERYKE_SQRNxE,698
20
- monocle_apptrace/metamodel/maps/lang_chain_methods.json,sha256=HaOhhxb3PkI7tXPxXhWR4cnWrnEHU--k5pOY9RS0Uew,3119
21
- monocle_apptrace/metamodel/maps/llama_index_methods.json,sha256=qpODnBHkaDjPBYZNd7clwmp_2subTu-fmI08Ky5OWdg,2192
22
- monocle_apptrace/metamodel/spans/README.md,sha256=_uMkLLaWitQ_rPh7oQbW5Oe7uGSv2h_QA6YwxHRJi74,5433
23
- monocle_apptrace/metamodel/spans/span_example.json,sha256=R4YVyz3rkhVc_FxpeBkY9JfO0GwluFa2A2wn4LkOPbo,4402
24
- monocle_apptrace/metamodel/spans/span_format.json,sha256=GhfioGgMhG7St0DeYA1fgNtMkbr9wiQ1L2hovekRQ24,1512
25
- monocle_apptrace-0.1.1.dist-info/METADATA,sha256=2Oz22Sjk1qarR4h_RctVoYnQWq0LSklrXu05_GFJjjE,5215
26
- monocle_apptrace-0.1.1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
27
- monocle_apptrace-0.1.1.dist-info/licenses/LICENSE,sha256=ay9trLiP5I7ZsFXo6AqtkLYdRqe5S9r-DrPOvsNlZrg,9136
28
- monocle_apptrace-0.1.1.dist-info/licenses/NOTICE,sha256=9jn4xtwM_uUetJMx5WqGnhrR7MIhpoRlpokjSTlyt8c,112
29
- monocle_apptrace-0.1.1.dist-info/RECORD,,