scalyr / dataset-addon-for-splunk

The DataSet Add-on for Splunk provides integration with
Apache License 2.0
4 stars 6 forks source link

DPDV-2606 - add more details to user-agent header #32

Closed zdaratom-s1 closed 1 year ago

zdaratom-s1 commented 1 year ago

Description

Adding following

in format: eg dataset-splunk-addon;2.0.2;Linux-5.15.49-linuxkit-pr-x86_64-with-redhat-8.8-Ootpa;python-3.7.16;splunk-VERSION=9.1.0.1

Testing

see https://app-qatesting.scalyr.com/events?filter=%22dataset-splunk-addon%22+uriPath+%21%3D+%27%2Fv2%2Fgraphql%27+_type+%21%3D+%27PerformanceEntry%27&startTime=1690960518083&teamToken=2N9XnLMqmdslZSDXTUgNeg--&endTime=1690960549845

screenshot-app-qatesting scalyr com-2023 08 02-09_16_05

martin-majlis-s1 commented 1 year ago

When I was clicking through the folders it looked to me, that the lib folder is for third party dependencies, that are then bundled to the resulting package. The sentinel one application - https://github.com/Sentinel-One/s1-splunk-app/tree/main/sentinelone_app_for_splunk/lib - is mentioning libraries in requirements and they are as well in the lib folder. I do not know, what is the proper way.

When I check the origin of that folder - https://github.com/scalyr/dataset-addon-for-splunk/pull/15 - it looks that it has been automatically generated but then somehow modified.

There is also this commit - https://github.com/scalyr/dataset-addon-for-splunk/commit/a95b5faf9cfaf8118249827d88f409967c6d94e1 - where they are introducing the user agent.

When I was trying to fix it - https://github.com/scalyr/dataset-addon-for-splunk/pull/25/files - I have picked different place. 🙈

Could you, please:

  1. Figure out, what is going on with the dataset_query_api_client. How it was generated?
  2. Can you, please, include some "proof" that it's really sending those headers? Please, see #23 and #24 for minimal level.
zdaratom-s1 commented 1 year ago
  1. Version of the used / bundled requests library dependency added
  2. Version of the bundled splunklib / splunk sdk is not used
  3. I have tried to follow pattern used in dataset-go library which copies the approach used in Scalyr Agent, I would prefer to user patterns which are in place already.