Google App Engine
Rapport de recherche Datadog : Bilan sur l'adoption de l'informatique sans serveur Rapport : Bilan sur l'adoption de l'informatique sans serveur

Google App Engine

Crawler Crawler

Présentation

Installez l’intégration Google App Engine dans votre projet Python pour :

  • Consulter les métriques de vos services Google App Engine (memcache, files d’attente de tâches, banques de données, etc.)
  • Consulter des métriques sur les requêtes (pourcentages, latence, coût, etc.)
  • Appliquer des tags aux métriques de Google App Engine en fonction de leur version pour comparer les performances des différentes versions

Vous pouvez également envoyer des métriques custom à Datadog.

Implémentation

Installation

Assurez-vous d’avoir activé Billing pour votre projet Google App Engine afin de recueillir toutes les métriques.

  1. Remplacez le répertoire par celui de l’application de votre projet.
  2. Dupliquez le module Google App Engine de Datadog.

    git clone https://github.com/DataDog/gae_datadog
  3. Modifiez le fichier app.yaml de votre projet.

    a. Ajoutez le gestionnaire Datadog à votre fichier app.yaml :

      handlers:
        # Should probably be at the beginning of the list
        # so it's not clobbered by a catchall route
        - url: /datadog
          script: gae_datadog.datadog.app

b. Configurez votre clé d’API. Cette partie doit se trouver au niveau supérieur du fichier, et non dans la section du gestionnaire.

  ```yaml
  env_variables:
    DATADOG_API_KEY: '<YOUR_DATADOG_API_KEY>'
  ```

c. Puisque le module dogapi envoie des métriques et des événements par le biais d’une connexion TLS sécurisée, ajoutez le module ssl dans le fichier app.yaml :

  ```yaml
  libraries:
    - name: ssl
      version: "latest"
  ```
  1. Ajoutez dogapi dans le fichier requirements.txt.

    echo dogapi >> requirements.txt
  2. Assurez-vous que les éléments exigés sont installés.

    pip install -r requirements.txt -t lib/
  3. Déployez votre application. Consultez la documentation de Google App Engine pour découvrir les commandes de déploiement de chaque langage. Pour les apps Python, il s’agit de la commande suivante :

    appcfg.py -A <project id> update app.yaml
  4. Saisissez l’URL de votre application dans la première zone de texte de l’écran de configuration de l’intégration. Si vous utilisez des files d’attente de tâches dans la console de développement Google, vous pouvez également les ajouter ici.

À ce stade, vous devriez recevoir un certain nombre de métriques pour votre environnement. Vous pouvez également choisir d’instrumenter davantage votre application à l’aide de la bibliothèque du langage de votre application.

Consultez la page Bibliothèques pour découvrir la liste de l’ensemble des bibliothèques client de Datadog et sa communauté pour DogStatsD et les API.

Données collectées

Métriques

gcp.gae.memcache.byte_hits
(gauge)
Sum of key and value bytes in successful get() and contains()
Shown as byte
gcp.gae.memcache.bytes
(gauge)
Sum of key and value sizes for all live entries currently in cache
Shown as byte
gcp.gae.memcache.hits
(gauge)
The counter of "successful" MemcacheService.get(Object) or MemcacheService.contains(Object) operations
Shown as hit
gcp.gae.memcache.items
(gauge)
Number of entries currently "alive" in the cache
Shown as item
gcp.gae.memcache.misses
(gauge)
The counter of "unsuccessful" MemcacheService.get(Object) or MemcacheService.contains(Object) operations
Shown as miss
gcp.gae.memcache.oldest_item_age
(gauge)
Milliseconds since last access of least-recently-used live entry
Shown as millisecond
gcp.gae.requests.cost.95percentile
(gauge)
The 95th percentile estimated fractional dollar cost of this request
Shown as dollar
gcp.gae.requests.cost.avg
(gauge)
The average estimated fractional dollar cost of this request
Shown as dollar
gcp.gae.requests.cost.count
(count)
The number of times the cost metric was sampled
Shown as request
gcp.gae.requests.cost.max
(gauge)
The maximum estimated fractional dollar cost of this request
Shown as dollar
gcp.gae.requests.cost.min
(gauge)
The minimum estimated fractional dollar cost of this request
Shown as dollar
gcp.gae.requests.latency.95percentile
(gauge)
The 95th percentile of time required to process request in seconds
Shown as second
gcp.gae.requests.latency.avg
(gauge)
The Average time required to process request in seconds
Shown as second
gcp.gae.requests.latency.count
(count)
The number of times the request latency metric was sampled
Shown as request
gcp.gae.requests.latency.max
(gauge)
The maximum time required to process request in seconds
Shown as second
gcp.gae.requests.latency.min
(gauge)
The minimum time required to process request in seconds
Shown as second
gcp.gae.requests.mcycles.95percentile
(gauge)
The 95th percentile of machine cycles used to process request
gcp.gae.requests.mcycles.avg
(gauge)
The average number of machine cycles used to process request
gcp.gae.requests.mcycles.count
(count)
The number of times the mcycles metric was sampled
gcp.gae.requests.mcycles.max
(gauge)
The maximum number of machine cycles used to process request
gcp.gae.requests.mcycles.min
(gauge)
The minimum number of machine cycles used to process request
gcp.gae.requests.pending_time.95percentile
(gauge)
The 95th percentile of time this request spent in the pending request queue
Shown as second
gcp.gae.requests.pending_time.avg
(gauge)
The Average time this request spent in the pending request queue
Shown as second
gcp.gae.requests.pending_time.count
(count)
The number of times the pending request metric was sampled
Shown as request
gcp.gae.requests.pending_time.max
(gauge)
The maximum time this request spent in the pending request queue
Shown as second
gcp.gae.requests.pending_time.min
(gauge)
The minimum time this request spent in the pending request queue
Shown as second
gcp.gae.requests.response_size.95percentile
(gauge)
The 95th percentile of size in bytes sent back to client by request
Shown as byte
gcp.gae.requests.response_size.avg
(gauge)
The Average size in bytes sent back to client by request
Shown as byte
gcp.gae.requests.response_size.count
(count)
The number of times the response size metric was sampled
Shown as request
gcp.gae.requests.response_size.max
(gauge)
The maximum size in bytes sent back to client by request
Shown as byte
gcp.gae.requests.response_size.min
(gauge)
The minimum size in bytes sent back to client by request
Shown as byte
gcp.gae.task_queue.tasks
(gauge)
The number of tasks remaining in the queue
Shown as task
gcp.gae.http.server.dos_intercept_count
(count)
Interceptions performed to prevent DoS attacks.
Shown as occurrence
gcp.gae.http.server.quota_denial_count
(count)
Failed requests due to the app being over quota.
Shown as request
gcp.gae.http.server.response_count
(count)
HTTP responses.
Shown as response
gcp.gae.http.server.response_style_count
(count)
Number of HTTP responses by serve style.
Shown as response
gcp.gae.memcache.centi_mcu_count
(count)
Memcache utilization as 1/100th Memcache Compute Units.
Shown as unit
gcp.gae.memcache.operation_count
(count)
Count of memcache key operations.
Shown as operation
gcp.gae.memcache.received_bytes_count
(count)
Number of bytes received by app from the memcache API.
Shown as byte
gcp.gae.memcache.sent_bytes_count
(count)
Number of bytes sent by app through the memcache API.
Shown as byte
gcp.gae.system.cpu.usage
(gauge)
CPU usage.
Shown as megahertz
gcp.gae.system.instance_count
(gauge)
Number of App Engine instances.
Shown as instance
gcp.gae.system.memory.usage
(gauge)
Total memory used by running instances.
Shown as byte
gcp.gae.system.network.received_bytes_count
(count)
Incoming network traffic.
Shown as byte
gcp.gae.system.network.sent_bytes_count
(count)
Outgoing network traffic.
Shown as byte
gcp.cloudtasks.api.request_count
(count)
Number of Cloud Tasks API calls.
Shown as request
gcp.cloudtasks.queue.task_attempt_count
(count)
Number of task attempts.
Shown as attempt
gcp.gae.http.server.response_latencies.avg
(gauge)
Average HTTP response latency.
Shown as millisecond
gcp.gae.http.server.response_latencies.samplecount
(count)
Sample Count for HTTP response latency.
Shown as millisecond
gcp.gae.http.server.response_latencies.sumsqdev
(gauge)
Sum of Squared Deviation for HTTP response latency.
Shown as millisecond
gcp.cloudtasks.queue.task_attempt_delays.avg
(gauge)
Average delay between each scheduled and actual attempt times.
Shown as millisecond
gcp.cloudtasks.queue.task_attempt_delays.samplecount
(count)
Sample Count for delay between each scheduled and actual attempt times.
Shown as millisecond
gcp.cloudtasks.queue.task_attempt_delays.sumsqdev
(gauge)
Sum of Squared Deviation for delay between each scheduled and actual attempt times.
Shown as millisecond
gcp.gae.flex.cpu.reserved_cores
(gauge)
Total number of CPU cores allocated to an App Engine flexible environment version.
Shown as core
gcp.gae.flex.cpu.utilization
(gauge)
The percentage of allocated CPU in use across an App Engine flexible environment version. Note that some machine types allow bursting above 100%.
Shown as percent
gcp.gae.flex.disk.read_bytes_count
(count)
Count of bytes read from disk across an App Engine flexible environment version.
Shown as byte
gcp.gae.flex.disk.write_bytes_count
(count)
Delta count of bytes written from disk across an App Engine flexible environment version.
Shown as byte
gcp.gae.flex.network.received_bytes_count
(count)
Count of incoming network bytes across all VMs in an App Engine flexible environment version
Shown as byte
gcp.gae.flex.network.sent_bytes_count
(count)
Count of outgoing network bytes across all VMs in an App Engine flexible environment version
Shown as byte

Événements

L’intégration Google App Engine n’inclut aucun événement.

Checks de service

L’intégration Google App Engine n’inclut aucun check de service.

Dépannage

Besoin d’aide ? Contactez l’assistance Datadog.