3

根据gae_datadogGithub repo,在应用引擎中设置 datadog 的方法是克隆 repo 并添加以下内容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

env_variables:
    DATADOG_API_KEY: 'YOURAPIKEY'

但是,这似乎不适用于他们的 nodejs 运行时。这是我的app.yaml

# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START 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

env_variables:
    DATADOG_API_KEY: 'MY_KEY'

runtime: nodejs
env: flex
# [END app_yaml]

似乎根本没有使用 datadog url 处理程序,因为它是 404。我假设 node.js 应用程序在这里优先,但我不知道如何更改它。

4

0 回答 0