-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into better_exceptions
- Loading branch information
Showing
110 changed files
with
1,569 additions
and
1,597 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
extend-ignore = E203,E701 | ||
exclude = */proto/*_pb2*.py |
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
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
version: '3.9' | ||
services: | ||
|
||
redis: | ||
|
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,43 @@ | ||
======= | ||
Logging | ||
======= | ||
|
||
DataClay offers logging to allow code debugging and information collection. | ||
|
||
When dataclay is imported, the logging is first initialized with a basic configuration in the config.py file: | ||
|
||
.. code-block:: python | ||
:caption: config.py | ||
... | ||
class Settings(BaseSettings): | ||
... | ||
loglevel: Annotated[str, StringConstraints(strip_whitespace=True, to_upper=True)] = "INFO" | ||
... | ||
settings = Settings() | ||
... | ||
def logger_config(**kwargs): | ||
logging.basicConfig(**kwargs) | ||
logger_config(level=settings.loglevel) | ||
If the user wants to configure its own logging, it can be done by importing the logging library and modifying | ||
the basicConfig. When client.start() function is called, then logger_config() is executed again, and if the argument | ||
"force" is True then the logging configuration is overwritten. | ||
|
||
.. warning:: | ||
When modifying the basicConfig remember that the **force=True** parameter is mandatory. Otherwise, this new | ||
configuration will be obviated. | ||
|
||
An example is available in `GitHub <https://github.com/bsc-dom/dataclay/tree/main/examples/client-logger-config>`_ |
This file was deleted.
Oops, something went wrong.
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,41 @@ | ||
Telemetry Configuration | ||
======================= | ||
|
||
dataClay is instrumented with `OpenTelemetry <https://opentelemetry.io/>`_ to allow observability of | ||
distributed traces, metrics, and logs. You can configure tracing to export telemetry data either in real-time or for post-mortem analysis. Visualizations can be performed in Grafana. | ||
|
||
Configuration | ||
------------- | ||
|
||
To activate tracing in dataClay, the following environment variables need to be set: | ||
|
||
- **`DATACLAY_TRACING`**: Set to `true` to enable tracing. | ||
- **`DATACLAY_TRACING_EXPORTER`**: Export traces to the OpenTelemetry Collector (`otlp`) or print traces to the console (`console`). The default is `otlp`. | ||
- **`DATACLAY_TRACING_HOST`**: Host of the OpenTelemetry Collector (default: `localhost`). | ||
- **`DATACLAY_TRACING_PORT`**: Port of the OpenTelemetry Collector (default: `4317`). | ||
- **`DATACLAY_SERVICE_NAME`**: The service name, which identifies dataClay components in trace data. | ||
|
||
Metrics | ||
------- | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - Metric | ||
- Description | ||
- Service | ||
* - dataclay_inmemory_objects | ||
- Number of objects in memory | ||
- backend, client | ||
* - dataclay_loaded_objects | ||
- Number of loaded objects | ||
- backend | ||
* - dataclay_stored_objects | ||
- Number of stored objects | ||
- backend | ||
* - dataclay_inmemory_misses_total | ||
- Number of inmemory misses | ||
- backend, client | ||
* - dataclay_inmemory_hits_total | ||
- Number of inmemory hits | ||
- backend, client |
Oops, something went wrong.