We want to track which of our customers are using Amazon Managed Grafana (AMG) to run this plugin, or a self-managed Grafana server. We can do this by checking the AWS_TRAVERSAL_FETCH variable. This is a configuration option for the AWS Datasource provisioner app, which is only used in AMG.
The easiest way to notify AWS IoT TwinMaker is through the user agent header in each API call. We already provide information about the Grafana build and runtime version. We should also add whether this is in AMG or not.
We should update the user agent string to be "%s/%s (%s; %s;) %s/%s-%s Grafana/%s AMG/%s", where the last string is a check: os.Getenv("AWS_TRAVERSAL_FETCH"). We should also show either true or false so it will be easy to parse and track with metrics from TwinMaker.
We want to track which of our customers are using Amazon Managed Grafana (AMG) to run this plugin, or a self-managed Grafana server. We can do this by checking the
AWS_TRAVERSAL_FETCH
variable. This is a configuration option for the AWS Datasource provisioner app, which is only used in AMG.The easiest way to notify AWS IoT TwinMaker is through the user agent header in each API call. We already provide information about the Grafana build and runtime version. We should also add whether this is in AMG or not.
We should update the user agent string to be
"%s/%s (%s; %s;) %s/%s-%s Grafana/%s AMG/%s"
, where the last string is a check:os.Getenv("AWS_TRAVERSAL_FETCH")
. We should also show eithertrue
orfalse
so it will be easy to parse and track with metrics from TwinMaker.Originally posted by @hwandersman in https://github.com/grafana/grafana-iot-twinmaker-app/discussions/216