stackdriver_exporter | Google Stackdriver Prometheus exporter | GCP library
kandi X-RAY | stackdriver_exporter Summary
kandi X-RAY | stackdriver_exporter Summary
Google Stackdriver Prometheus exporter
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of stackdriver_exporter
stackdriver_exporter Key Features
stackdriver_exporter Examples and Code Snippets
Community Discussions
Trending Discussions on stackdriver_exporter
QUESTION
I'm trying to setup OpenCensus for our project, but I'm running into Bazel
issues.
ANSWER
Answered 2020-Apr-24 at 12:22So for people that run into this, the problem was me missing the GoogleAPIs repo. This is the final import I ended up with.
QUESTION
I spent my day on this and I juste can't see what I'm doing wrong and I can't find an answer to my issue in other posts, so I'm asking for help.
I have a compute instance with prometheus already install and a service account with role/viewer already configured for auto discovery and working.
I need to add to the metrics the stackdrivers monitoring metrics so I added the stackdriver exporter on the instance, still no problems the service is running and I can launch requests on it with prometheus.
The service is launch like this:
...ANSWER
Answered 2018-Dec-01 at 09:09Be aware that in gcloud the final permissions are a "mask" between the roles/permissions of the service account and the scopes of the instance.
When you set up an instance to run as a service account, the level of access the service account has is determined by the combination of access scopes granted to the instance and IAM roles granted to the service account.
So if you are running this with a service account with the role monitoring viewer
in a instance without the scope https://www.googleapis.com/auth/monitoring.read
you won't be able to read the monitor metrics.
1.- Check the scope of your instance with gcloud compute instances describe INSTANCE
. You'll see something like this:
- email: 487724816353-compute@developer.gserviceaccount.com
scopes:
- https://www.googleapis.com/auth/monitoring.write
- https://www.googleapis.com/auth/logging.write
- https://www.googleapis.com/auth/devstorage.read_only
Can you see the right scopes there?
2.- If not try to set the scopes that you need with: (You need to stop the instance for that)
gcloud compute instances set-service-account INSTANCE \
--service-account SERVICE_ACCOUNT@xxxxxxxx.iam.gserviceaccount.com \
--scopes cloud-platform
3.- The previous command allows full access to all the APIS in the instance as recommended in the gcloud best practices (https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#best_practices). And then you can control the final permissions just adding/removing roles to the service account.
QUESTION
I am using Opencensus to do some monitoring on a grpc server with 10 workers. My question is whether, when making a Tracer, the exporter for the tracer should be local or Global. IE
this is the server:
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
Do I do:
tracer_module.Tracer(sampler=always_on.AlwaysOnSampler(), exporter=GLOBAL_EXPORTER) where: GLOBAL_EXPORTER = stackdriver_exporter.StackdriverExporter(transport=BackgroundThreadTransport)) OR do I do: tracer_module.Tracer(sampler=always_on.AlwaysOnSampler(), exporter=stackdriver_exporter.StackdriverExporter(transport=BackgroundThreadTransport)))
I have tried both and they work. The former will use a global exporter which should be more efficient (I would think) but the aggregation seems a bit odd (one call is 'aggregated with another). On the other hand, the second way makes a second exporter (which is short lived, since it will exist only for that call) and does seem to export correctly. Question is more what is more correct from a system perspective. IE for the second option does creating stackdriver_exporter.StackdriverExporter(transport=BackgroundThreadTransport) invalidate a different exporter (which was created in a different thread)?
...ANSWER
Answered 2018-Oct-31 at 20:52You should use a global exporter. It was not intended for a new export thread to be created for every Tracer. There should be one background thread running which handles all exporting to StackDriver.
As for the aggregation, it shouldn't be aggregating all the spans together. That may be a bug in the StackDriver UI (there are a number of known issues).
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stackdriver_exporter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page