dynatrace-extensions / dt-extensions-python-sdk

Dynatrace Python Extensions SDK
https://dynatrace-extensions.github.io/dt-extensions-python-sdk/
MIT License
8 stars 2 forks source link

Add initial snapshot support #66

Closed dlopes7 closed 1 month ago

dlopes7 commented 1 month ago

This adds initial support for snapshot, the idea is:

If running on the OneAgent:

If running in dt-sdk run

Example usage:

      process_snapshot = self.get_snapshot()
      for entry in process_snapshot.entries:
          for process in entry.processes:
              if process.process_name in ("squid", "squid.exe")
                  self.extract_squid_metrics(process)