Instrumentation with influxdb backend #368
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
See comments from this issue for details about the implementation choice of InfluxDB.
I looked for the 2 endpoints referred in the issue 298
RecordActivityTaskHeartbeat
andPollForActivityTask
, and implement a method insideswf/core.py
to send statistic to InfluxDB.I define the tags
region
endpoint
andhostname
.Considerations for Reviewers
This library is used to talk to InfluxDB backend, I assume this part of the code would be non blocking and should not impact the simpleflow behavior, because UDP do not except any answer from the server.
Maybe we should use some AWS tag instead of the worker hostname (not human friendly)
Maybe we should pay attention if the worker would not be able to resolve the grafana fqdn.
Authentication and encryption :
The UDP listener on InfluxDB server doesn't seems to support this, a solutions could consist in writing to a Telegraf proxy agent wich would send the data to Influx over HTTPS.
Or use a local database in the same network.
Test environment/Test case
Considerations for Deployment
In order to implement this solution, the InfluxDB server would have to be setup and the environment secured.