Skip to content

Commit

Permalink
Merge pull request #1795 from GoogleCloudPlatform/acpana/direct-logbu…
Browse files Browse the repository at this point in the history
…cketref

tests:chore: update for logbucketmetric
  • Loading branch information
google-oss-prow[bot] authored May 15, 2024
2 parents 2399663 + 567f6cc commit 71f936c
Showing 1 changed file with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Copyright 2024 Google LLC
#
# 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.

apiVersion: logging.cnrm.cloud.google.com/v1beta1
kind: LoggingLogMetric
metadata:
name: logginglogmetric-${uniqueId}
spec:
description: "An updated sample log metric"
filter: "resource.type=gae_app AND severity>=ERROR"
disabled: true
metricDescriptor:
labels:
- key: "mass"
valueType: "STRING"
description: "amount of matter"
- key: "hasMass"
valueType: "BOOL"
description: "whether the item has a mass"
- key: "sku"
valueType: "INT64"
description: "identifying number for item"
metricKind: "DELTA"
valueType: "DISTRIBUTION"
unit: "s"
displayName: "updated-sample-descriptor"
metadata:
samplePeriod: "3.5s"
ingestDelay: "3.5s"
launchStage: "PRELAUNCH"
valueExtractor: "EXTRACT(jsonPayload.response)"
labelExtractors:
mass: "EXTRACT(jsonPayload.request)"
hasMass: "REGEXP_EXTRACT(jsonPayload.request, \".*([1-9]).*\")"
sku: "EXTRACT(jsonPayload.id)"
bucketOptions:
linearBuckets:
numFiniteBuckets: 4
width: 2.5
offset: 0.5
projectRef:
external: "projects/${projectId}"
loggingLogBucketRef:
name: logginglogbucket-dep-${uniqueId}
kind: LoggingLogBucket

0 comments on commit 71f936c

Please sign in to comment.