python-openobserve 0.1.2__tar.gz → 0.1.3__tar.gz
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.
- {python_openobserve-0.1.2 → python_openobserve-0.1.3}/PKG-INFO +1 -1
- {python_openobserve-0.1.2 → python_openobserve-0.1.3}/pyproject.toml +1 -1
- {python_openobserve-0.1.2 → python_openobserve-0.1.3}/python_openobserve/openobserve.py +0 -9
- {python_openobserve-0.1.2 → python_openobserve-0.1.3}/LICENSE +0 -0
- {python_openobserve-0.1.2 → python_openobserve-0.1.3}/README.md +0 -0
- {python_openobserve-0.1.2 → python_openobserve-0.1.3}/python_openobserve/__init__.py +0 -0
|
@@ -33,13 +33,6 @@ class OpenObserve:
|
|
|
33
33
|
print("could not convert timestamp: " + str(timestamp))
|
|
34
34
|
return timestamp
|
|
35
35
|
|
|
36
|
-
def __float2Int(self, flatdict: dict) -> dict:
|
|
37
|
-
# apparently openobserve does not support float values?!
|
|
38
|
-
for key, val in flatdict.items():
|
|
39
|
-
if isinstance(val, float):
|
|
40
|
-
flatdict[key] = int(val)
|
|
41
|
-
return flatdict
|
|
42
|
-
|
|
43
36
|
def __intts2datetime(self, flatdict: dict) -> dict:
|
|
44
37
|
for key, val in flatdict.items():
|
|
45
38
|
if "time" in key:
|
|
@@ -57,8 +50,6 @@ class OpenObserve:
|
|
|
57
50
|
# expects a flattened json
|
|
58
51
|
document = flatten(document)
|
|
59
52
|
document = self.__datetime2Str(document)
|
|
60
|
-
# apparently openobserve does not support float values?!
|
|
61
|
-
document = self.__float2Int(document)
|
|
62
53
|
|
|
63
54
|
res = requests.post(self.openobserve_url.replace("[STREAM]", index) + "/_json", headers=self.headers, json=[document])
|
|
64
55
|
if res.status_code != 200:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|