Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CONTP-277] add kubernetes_resources_annotations_as_tags and kubernetes_resources_labels_as_tags #27369

Conversation

adel121
Copy link
Contributor

@adel121 adel121 commented Jul 5, 2024

What does this PR do?

Adds the capability to configure kubernetes_resources_labels_as_tags and kubernetes_resources_annotations_as_tags.

We already have the following possible configuration options:

  • kubernetes_pod_labels_as_tags
  • kubernetes_pod_annotations_as_tags
  • kubernetes_node_labels_as_tags
  • kubernetes_node_annotations_as_tags
  • kubernetes_namespace_labels_as_tags
  • kubernetes_namespace_annotations_as_tags

The 2 added configuration options should become the preferred way to configure kubernetes resource tagging based on labels and/or annotations.

Motivation

Be able to generically choose how to tag kubernetes resources based on their annotations and/or labels.

Additional Notes

In order to preserve backward compatibility, we still support the old configuration options.

In the event where the user configures both the old and new configurations, the agent will merge all configurations into one config while giving precedence to the new config option in case of conflict by key. (See QA section for examples).

Possible Drawbacks / Trade-offs

To simplify, we modified workloadmeta collector factories so that the metadata collector never collects pods or deployments.

Pods and Deployments will always have their own dedicated collectors.

This simplification helps ensure we have a single source of truth for pod and deployment data in workloadmeta, which translates to a single source of truth in the tagger for pods and deployments.

Describe how to test/QA your changes

To QA, let's create a kind cluster with few nodes.

create a file called kind-config.yaml with the following content:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker

Run the following command:

kind create cluster --config kind-config.yaml

Let's check and note the nodes labels:

kubectl get node kind-worker -o yaml
apiVersion: v1
kind: Node
metadata:
  annotations:
    kubeadm.alpha.kubernetes.io/cri-socket: unix:///run/containerd/containerd.sock
    node.alpha.kubernetes.io/ttl: "0"
    volumes.kubernetes.io/controller-managed-attach-detach: "true"
  creationTimestamp: "2024-07-29T13:53:24Z"
  labels:
    beta.kubernetes.io/arch: arm64
    beta.kubernetes.io/os: linux
    kubernetes.io/arch: arm64
    kubernetes.io/hostname: kind-worker
    kubernetes.io/os: linux

Case 1: Ensure old configuration options still work as expected

Deploy the following with helm:

datadog:
  apiKeyExistingSecret: datadog-secret
  appKeyExistingSecret: datadog-secret
  logLevel: DEBUG
  kubelet:
    tlsVerify: false

  logs:
    enabled: true
    containerCollectAll: true

  clusterTagger:
    # datadog.clusterTagger.collectKubernetesTags -- Enables Kubernetes resources tags collection.
    collectKubernetesTags: true

  podLabelsAsTags:
    stale-label: stale-label
  podAnnotationsAsTags:
    stale-annotation: stale-annotation

  namespaceLabelsAsTags:
    stale-label: stale-label

  namespaceAnnotationsAsTags:
    stale-annotation: stale-annotation #stale-annotation-should-be-overridden

  nodeLabelsAsTags:
    kubernetes.io/arch: arch-as-tag #should-not-be-used-should-be-overridden

clusterAgent:
  enabled: true

Create the following deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dummy-nginx-app
  labels:
    x-team: cont-p
    x-email: cont-p-datadoghq.com
  annotations:
    x-team: cont-int
    x-email: cont-int-datadoghq.com
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dummy-nginx-app
  template:
    metadata:
      labels:
        app: dummy-nginx-app
        x-ref: base
        stale-label: some-old-label-value
        admission.datadoghq.com/enabled: "false"
      annotations:
        x-ann: acid
        stale-annotation: some-old-annotation-value
    spec:
      containers:
        - name: dummy-nginx-app
          image: nginx

Let's also add some labels and annotations to the default namespace:

Run kubectl edit namespace default, then add the following label and annotation:

  • stale-annotation: some-old-annotation-value
  • stale-label: some-old-label-value

Verify that the tags are correct in the tagger for pods, namespaces and nodes, both on the cluster agent and on the node agent:

Verifying tags in DCA:

kubectl exec <cluster-agent-pod-name> -- agent tagger-list

=== Entity kubernetes_pod_uid://d9b4b8ea-7a1f-4dba-bb6a-dc36315123bd ===
== Source workloadmeta-kubernetes_pod =
=Tags: [kube_deployment:dummy-nginx-app kube_namespace:default kube_ownerref_kind:replicaset kube_ownerref_name:dummy-nginx-app-5b4d8697f4 kube_qos:BestEffort kube_replica_set:dummy-nginx-app-5b4d8697f4 pod_name:dummy-nginx-app-5b4d8697f4-4hs4k pod_phase:running stale-annotation:some-old-annotation-value stale-label:some-old-label-value]
===

=== Entity kubernetes_metadata:///nodes//kind-worker ===
== Source workloadmeta-kubernetes_metadata =
=Tags: [arch-as-tag:arm64]
===

=== Entity kubernetes_metadata:///namespaces//default ===
== Source workloadmeta-kubernetes_metadata =
=Tags: [stale-annotation:some-old-annotation-value stale-label:some-old-label-value]
===

Verifying tags in DA:

kubectl exec <agent-pod-name> -- agent tagger-list 

=== Entity kubernetes_pod_uid://9088f360-321d-4895-bb1e-25fe1c04df86 ===
== Source workloadmeta-kubernetes_pod =
=Tags: [kube_app_component:agent kube_app_instance:datadog-agent kube_app_managed_by:Helm kube_app_name:datadog-agent kube_daemon_set:datadog-agent kube_namespace:default kube_ownerref_kind:daemonset kube_ownerref_name:datadog-agent kube_qos:BestEffort kube_service:datadog-agent pod_name:datadog-agent-5fwkz pod_phase:running stale-annotation:some-old-annotation-value stale-label:some-old-label-value]
===

Case 2: Ensure new configuration options work along with old configuration options

This time let's install the helm chart with both the old configuration options and new ones.

datadog:
  apiKeyExistingSecret: datadog-secret
  appKeyExistingSecret: datadog-secret
  logLevel: DEBUG
  kubelet:
    tlsVerify: false

  logs:
    enabled: true
    containerCollectAll: true

  clusterTagger:
    # datadog.clusterTagger.collectKubernetesTags -- Enables Kubernetes resources tags collection.
    collectKubernetesTags: true

  podLabelsAsTags:
    stale-label: stale-label
  podAnnotationsAsTags:
    stale-annotation: stale-annotation

  namespaceLabelsAsTags:
    stale-label: stale-label

  namespaceAnnotationsAsTags:
    stale-annotation: stale-annotation-should-be-overridden

  nodeLabelsAsTags:
    kubernetes.io/arch: should-not-be-used-should-be-overridden

agents:
  containers:
    agent:
      env:
        - name: DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS
          value: |
            {"deployments.apps":{"x-team":"team-from-label"},"pods":{"x-ref":"reference"},"namespaces":{"kubernetes.io/metadata.name":"name-as-tag"},"nodes":{"kubernetes.io/os":"os-as-tag", "kubernetes.io/arch": "arch-as-tag"}}
        - name: DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS
          value: |
            {"deployments.apps":{"x-team":"team-from-annotation"},"pods":{"x-ann":"annotation-reference"}, "namespaces":{"stale-annotation": "annotation-as-tag"}}


clusterAgent:
  enabled: true
  replicas: 1
  env:
    - name: DD_KUBERNETES_RESOURCES_LABELS_AS_TAGS
      value: |
        {"deployments.apps":{"x-team":"team-from-label"},"pods":{"x-ref":"reference"},"namespaces":{"kubernetes.io/metadata.name":"name-as-tag"},"nodes":{"kubernetes.io/os":"os-as-tag", "kubernetes.io/arch": "arch-as-tag"}}
    - name: DD_KUBERNETES_RESOURCES_ANNOTATIONS_AS_TAGS
      value: |
        {"deployments.apps":{"x-team":"team-from-annotation"},"pods":{"x-ann":"annotation-reference"}, "namespaces":{"stale-annotation": "annotation-as-tag"}}

Notice how we have some conflicting configurations. For example, kubernetes.io/os label is mapped to os-as-tag in the new configuration for nodes, but it is mapped to should-not-be-used-should-be-overridden in the old nodeLabelsAsTags configuration option. The new value should take precedence over the old one.

If not already done, create the following deployment :

apiVersion: apps/v1
kind: Deployment
metadata:
  name: dummy-nginx-app
  labels:
    x-team: cont-p
    x-email: cont-p-datadoghq.com
  annotations:
    x-team: cont-int
    x-email: cont-int-datadoghq.com
spec:
  replicas: 1
  selector:
    matchLabels:
      app: dummy-nginx-app
  template:
    metadata:
      labels:
        app: dummy-nginx-app
        x-ref: base
        stale-label: some-old-label-value
        admission.datadoghq.com/enabled: "false"
      annotations:
        x-ann: acid
        stale-annotation: some-old-annotation-value
    spec:
      containers:
        - name: dummy-nginx-app
          image: nginx

If not already done, let's also add some labels and annotations to the default namespace:

Run kubectl edit namespace default, then add the following label and annotation:

  • stale-annotation: some-old-annotation-value
  • stale-label: some-old-label-value

Verify that the tags are correct in the tagger for deployments, pods, namespaces and nodes, both on the cluster agent and on the node agent:

Verifying tags in DCA:

kubectl exec <cluster-agent-pod-name> -- agent tagger-list

=== Entity deployment://default/dummy-nginx-app ===
== Source workloadmeta-kubernetes_deployment =
=Tags: [team-from-annotation:cont-int team-from-label:cont-p]
===

=== Entity kubernetes_metadata:///namespaces//default ===
== Source workloadmeta-kubernetes_metadata =
=Tags: [annotation-as-tag:some-old-annotation-value name-as-tag:default stale-label:some-old-label-value]
===

=== Entity kubernetes_metadata:///nodes//kind-worker ===
== Source workloadmeta-kubernetes_metadata =
=Tags: [arch-as-tag:arm64 os-as-tag:linux]
===

=== Entity kubernetes_pod_uid://d9b4b8ea-7a1f-4dba-bb6a-dc36315123bd ===
== Source workloadmeta-kubernetes_pod =
=Tags: [annotation-reference:acid kube_deployment:dummy-nginx-app kube_namespace:default kube_ownerref_kind:replicaset kube_ownerref_name:dummy-nginx-app-5b4d8697f4 kube_qos:BestEffort kube_replica_set:dummy-nginx-app-5b4d8697f4 pod_name:dummy-nginx-app-5b4d8697f4-4hs4k pod_phase:running reference:base stale-annotation:some-old-annotation-value stale-label:some-old-label-value]
===

Verifying tags in DA:

kubectl exec <agent-pod-name> -- agent tagger-list 

=== Entity kubernetes_pod_uid://d9b4b8ea-7a1f-4dba-bb6a-dc36315123bd ===
== Source workloadmeta-kubernetes_pod =
=Tags: [annotation-as-tag:some-old-annotation-value annotation-reference:acid kube_deployment:dummy-nginx-app kube_namespace:default kube_ownerref_kind:replicaset kube_ownerref_name:dummy-nginx-app-5b4d8697f4 kube_qos:BestEffort kube_replica_set:dummy-nginx-app-5b4d8697f4 name-as-tag:default pod_name:dummy-nginx-app-5b4d8697f4-4hs4k pod_phase:running reference:base stale-annotation:some-old-annotation-value stale-label:some-old-label-value]
===

@adel121 adel121 added this to the 7.56.0 milestone Jul 5, 2024
@github-actions github-actions bot added the team/container-platform The Container Platform Team label Jul 5, 2024
@pr-commenter
Copy link

pr-commenter bot commented Jul 5, 2024

Regression Detector

Regression Detector Results

Run ID: 537fd7f4-173f-4a42-a371-4b2b5adf874c Metrics dashboard Target profiles

Baseline: e700016
Comparison: 9042bdd

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI links
tcp_syslog_to_blackhole ingress throughput +0.98 [-11.81, +13.78] Logs
file_tree memory utilization +0.58 [+0.51, +0.64] Logs
basic_py_check % cpu utilization +0.32 [-2.28, +2.92] Logs
otel_to_otel_logs ingress throughput +0.06 [-0.75, +0.88] Logs
idle memory utilization +0.03 [-0.00, +0.06] Logs
uds_dogstatsd_to_api ingress throughput +0.00 [-0.00, +0.00] Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.89 [-1.77, -0.00] Logs
pycheck_1000_100byte_tags % cpu utilization -1.67 [-6.47, +3.12] Logs

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@adel121 adel121 modified the milestones: 7.56.0, 7.57.0 Jul 5, 2024
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 4bdcefc to 0a1d42e Compare July 15, 2024 10:58
@adel121 adel121 changed the base branch from main to adelhajhassan/duplicate_pod_and_deployment_metadata_with_address_aliasing July 15, 2024 11:00
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch 3 times, most recently from 3dd5091 to 932a87b Compare July 15, 2024 13:33
@adel121 adel121 marked this pull request as ready for review July 15, 2024 13:33
@adel121 adel121 requested review from a team as code owners July 15, 2024 13:33
@adel121 adel121 changed the title add kubernetes_resources_annotations_as_tags and kubernetes_resources_labels_as_tags [CONTP-277] add kubernetes_resources_annotations_as_tags and kubernetes_resources_labels_as_tags Jul 15, 2024
Base automatically changed from adelhajhassan/duplicate_pod_and_deployment_metadata_with_address_aliasing to main July 15, 2024 14:18
@dd-mergequeue dd-mergequeue bot requested review from a team as code owners July 15, 2024 14:18
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch 3 times, most recently from 5f1969e to 0f4cd6a Compare July 15, 2024 15:15
Copy link
Contributor

@buraizu buraizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting some minor edits and clarification to the release note

@adel121 adel121 requested a review from buraizu July 15, 2024 19:30
Copy link
Contributor

@buraizu buraizu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adel121 thank you for confirming that. I've left a final suggestion for additional clarification, but overall LGTM and approving.

- |
Added capability to tag any Kubernetes resource based on labels and annotations.
This feature can be configured with `kubernetes_resources_annotations_as_tags` and `kubernetes_resources_labels_as_tags`.
These feature configurations are maps from group resource to a map of annotations/labels to tag.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These feature configurations are maps from group resource to a map of annotations/labels to tag.
These feature configurations associate a group resource with a map of annotations or labels to convert to tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with a map of annotations or labels to convert to tags.

This is not very accurate.

I made a modification to it, let me know if it makes sense to you.

Added capability to tag any Kubernetes resource based on labels and annotations.
This feature can be configured with `kubernetes_resources_annotations_as_tags` and `kubernetes_resources_labels_as_tags`.
These feature configurations are maps from group resource to a map of annotations/labels to tag.
For example, `deployments.apps` can be mapped to an annotations-to-tags map to configure annotations as tags for deployments.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For example, `deployments.apps` can be mapped to an annotations-to-tags map to configure annotations as tags for deployments.
For example, `deployments.apps` can be associated with an annotations-to-tags map to configure annotations as tags for deployments.

@adel121 adel121 removed request for a team July 16, 2024 07:32
@pr-commenter
Copy link

pr-commenter bot commented Jul 16, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=42136011 --os-family=ubuntu

Note: This applies to commit 9042bdd

@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from cd210f8 to 3740333 Compare August 16, 2024 13:26
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 3740333 to 133fbf1 Compare August 16, 2024 13:31
@adel121 adel121 requested a review from a team as a code owner August 16, 2024 13:40
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 3ab05c3 to 133fbf1 Compare August 16, 2024 13:46
@adel121 adel121 removed the request for review from a team August 16, 2024 13:46
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 2dfa4e2 to 133fbf1 Compare August 16, 2024 13:49
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 133fbf1 to dec764e Compare August 16, 2024 13:51
@zhuminyi
Copy link
Contributor

The given example is injecting kubernetes_resources_labels_as_tags from env. Do we have plan to support config yaml?

Copy link
Contributor

@zhuminyi zhuminyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 9614d91 to 2ea8eec Compare August 19, 2024 08:56
@adel121 adel121 force-pushed the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch from 2ea8eec to 9042bdd Compare August 19, 2024 15:25
Copy link
Contributor

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between cc7a427 and b4ec28f.

tl;dr

Use these benchmarks as an insight tool during development.

  1. Skim down the vs base column in each chart. If there is a ~, then there was no statistically significant change to the benchmark. Otherwise, ensure the estimated percent change is either negative or very small.

  2. The last row of each chart is the geomean. Ensure this percentage is either negative or very small.

What is this benchmarking?

The BenchmarkStartEndInvocation compares the amount of time it takes to call the start-invocation and end-invocation endpoints. For universal instrumentation languages (Dotnet, Golang, Java, Ruby), this represents the majority of the duration overhead added by our tracing layer.

The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type.

How do I interpret these charts?

The charts below comes from benchstat. They represent the statistical change in duration (sec/op), memory overhead (B/op), and allocations (allocs/op).

The benchstat docs explain how to interpret these charts.

Before the comparison table, we see common file-level configuration. If there are benchmarks with different configuration (for example, from different packages), benchstat will print separate tables for each configuration.

The table then compares the two input files for each benchmark. It shows the median and 95% confidence interval summaries for each benchmark before and after the change, and an A/B comparison under "vs base". ... The p-value measures how likely it is that any differences were due to random chance (i.e., noise). The "~" means benchstat did not detect a statistically significant difference between the two inputs. ...

Note that "statistically significant" is not the same as "large": with enough low-noise data, even very small changes can be distinguished from noise and considered statistically significant. It is, of course, generally easier to distinguish large changes from noise.

Finally, the last row of the table shows the geometric mean of each column, giving an overall picture of how the benchmarks changed. Proportional changes in the geomean reflect proportional changes in the benchmarks. For example, given n benchmarks, if sec/op for one of them increases by a factor of 2, then the sec/op geomean will increase by a factor of ⁿ√2.

I need more help

First off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development.

If you would like a hand interpreting the results come chat with us in #serverless-agent in the internal DataDog slack or in #serverless in the public DataDog slack. We're happy to help!

Benchmark stats
goos: linux
goarch: amd64
pkg: github.com/DataDog/datadog-agent/pkg/serverless/daemon
cpu: AMD EPYC 7763 64-Core Processor                
                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │         sec/op         │    sec/op     vs base               │
api-gateway-appsec.json                            84.98µ ± 4%   86.14µ ± 13%       ~ (p=0.436 n=10)
api-gateway-kong-appsec.json                       65.46µ ± 3%   66.50µ ±  2%       ~ (p=0.143 n=10)
api-gateway-kong.json                              65.05µ ± 3%   65.46µ ±  3%       ~ (p=0.739 n=10)
api-gateway-non-proxy-async.json                   102.0µ ± 5%   105.5µ ±  2%  +3.45% (p=0.029 n=10)
api-gateway-non-proxy.json                         105.1µ ± 3%   106.0µ ±  2%       ~ (p=0.853 n=10)
api-gateway-websocket-connect.json                 68.28µ ± 3%   69.74µ ±  1%       ~ (p=0.089 n=10)
api-gateway-websocket-default.json                 62.05µ ± 2%   62.82µ ±  2%       ~ (p=0.063 n=10)
api-gateway-websocket-disconnect.json              62.71µ ± 2%   62.92µ ±  1%       ~ (p=0.353 n=10)
api-gateway.json                                   116.9µ ± 1%   115.4µ ±  1%  -1.28% (p=0.043 n=10)
application-load-balancer.json                     64.46µ ± 1%   64.13µ ±  1%       ~ (p=0.123 n=10)
cloudfront.json                                    47.70µ ± 4%   47.54µ ±  2%       ~ (p=0.315 n=10)
cloudwatch-events.json                             38.67µ ± 2%   38.25µ ±  1%       ~ (p=0.089 n=10)
cloudwatch-logs.json                               66.83µ ± 2%   65.20µ ±  2%  -2.43% (p=0.003 n=10)
custom.json                                        32.25µ ± 2%   30.91µ ±  1%  -4.18% (p=0.000 n=10)
dynamodb.json                                      97.51µ ± 1%   94.62µ ±  2%  -2.97% (p=0.003 n=10)
empty.json                                         30.86µ ± 4%   29.34µ ±  1%  -4.92% (p=0.002 n=10)
eventbridge-custom.json                            42.81µ ± 2%   42.34µ ±  1%       ~ (p=0.218 n=10)
http-api.json                                      72.99µ ± 1%   73.13µ ±  3%       ~ (p=0.853 n=10)
kinesis-batch.json                                 71.29µ ± 2%   71.43µ ±  1%       ~ (p=1.000 n=10)
kinesis.json                                       54.88µ ± 2%   54.61µ ±  2%       ~ (p=0.315 n=10)
s3.json                                            60.37µ ± 2%   59.50µ ±  1%  -1.45% (p=0.007 n=10)
sns-batch.json                                     90.32µ ± 1%   90.48µ ±  2%       ~ (p=1.000 n=10)
sns.json                                           65.12µ ± 1%   65.25µ ±  3%       ~ (p=0.971 n=10)
snssqs.json                                        112.4µ ± 2%   112.0µ ±  2%       ~ (p=0.481 n=10)
snssqs_no_dd_context.json                          99.42µ ± 2%   99.89µ ±  0%       ~ (p=0.631 n=10)
sqs-aws-header.json                                56.36µ ± 2%   56.28µ ±  3%       ~ (p=0.315 n=10)
sqs-batch.json                                     95.35µ ± 2%   93.93µ ±  2%       ~ (p=0.075 n=10)
sqs.json                                           69.86µ ± 2%   70.18µ ±  2%       ~ (p=0.853 n=10)
sqs_no_dd_context.json                             64.72µ ± 3%   63.45µ ±  1%       ~ (p=0.089 n=10)
geomean                                            67.45µ        67.17µ        -0.41%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │          B/op          │     B/op      vs base               │
api-gateway-appsec.json                           37.25Ki ± 0%   37.32Ki ± 0%  +0.19% (p=0.000 n=10)
api-gateway-kong-appsec.json                      26.91Ki ± 0%   26.92Ki ± 0%       ~ (p=0.182 n=10)
api-gateway-kong.json                             24.41Ki ± 0%   24.41Ki ± 0%       ~ (p=0.695 n=10)
api-gateway-non-proxy-async.json                  48.03Ki ± 0%   48.10Ki ± 0%  +0.13% (p=0.000 n=10)
api-gateway-non-proxy.json                        47.26Ki ± 0%   47.31Ki ± 0%  +0.11% (p=0.000 n=10)
api-gateway-websocket-connect.json                25.46Ki ± 0%   25.50Ki ± 0%  +0.13% (p=0.000 n=10)
api-gateway-websocket-default.json                21.36Ki ± 0%   21.40Ki ± 0%  +0.18% (p=0.000 n=10)
api-gateway-websocket-disconnect.json             21.15Ki ± 0%   21.19Ki ± 0%  +0.16% (p=0.000 n=10)
api-gateway.json                                  49.56Ki ± 0%   49.55Ki ± 0%       ~ (p=0.254 n=10)
application-load-balancer.json                    22.34Ki ± 0%   23.27Ki ± 0%  +4.18% (p=0.000 n=10)
cloudfront.json                                   17.64Ki ± 0%   17.66Ki ± 0%  +0.11% (p=0.003 n=10)
cloudwatch-events.json                            11.68Ki ± 0%   11.72Ki ± 0%  +0.28% (p=0.000 n=10)
cloudwatch-logs.json                              53.37Ki ± 0%   53.37Ki ± 0%       ~ (p=0.671 n=10)
custom.json                                       9.722Ki ± 0%   9.735Ki ± 0%       ~ (p=0.060 n=10)
dynamodb.json                                     40.78Ki ± 0%   40.79Ki ± 0%       ~ (p=0.128 n=10)
empty.json                                        9.287Ki ± 0%   9.291Ki ± 0%       ~ (p=0.618 n=10)
eventbridge-custom.json                           13.40Ki ± 0%   13.44Ki ± 0%  +0.28% (p=0.001 n=10)
http-api.json                                     23.71Ki ± 0%   23.77Ki ± 0%  +0.26% (p=0.000 n=10)
kinesis-batch.json                                26.99Ki ± 0%   27.01Ki ± 0%  +0.09% (p=0.015 n=10)
kinesis.json                                      17.76Ki ± 0%   17.81Ki ± 0%  +0.28% (p=0.000 n=10)
s3.json                                           20.32Ki ± 0%   20.38Ki ± 0%  +0.31% (p=0.025 n=10)
sns-batch.json                                    38.67Ki ± 0%   38.69Ki ± 0%       ~ (p=0.382 n=10)
sns.json                                          23.95Ki ± 0%   23.95Ki ± 0%       ~ (p=0.404 n=10)
snssqs.json                                       50.76Ki ± 0%   50.81Ki ± 0%       ~ (p=0.051 n=10)
snssqs_no_dd_context.json                         44.78Ki ± 0%   44.87Ki ± 0%  +0.19% (p=0.000 n=10)
sqs-aws-header.json                               18.80Ki ± 0%   18.81Ki ± 0%       ~ (p=0.493 n=10)
sqs-batch.json                                    41.62Ki ± 0%   41.61Ki ± 0%       ~ (p=0.425 n=10)
sqs.json                                          25.59Ki ± 0%   25.53Ki ± 0%       ~ (p=0.123 n=10)
sqs_no_dd_context.json                            20.65Ki ± 1%   20.67Ki ± 1%       ~ (p=0.631 n=10)
geomean                                           25.70Ki        25.76Ki       +0.25%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │       allocs/op        │ allocs/op   vs base                 │
api-gateway-appsec.json                             629.0 ± 0%   630.0 ± 0%       ~ (p=0.370 n=10)
api-gateway-kong-appsec.json                        488.0 ± 0%   488.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-kong.json                               466.0 ± 0%   466.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway-non-proxy-async.json                    725.0 ± 0%   725.5 ± 0%       ~ (p=1.000 n=10)
api-gateway-non-proxy.json                          716.0 ± 0%   716.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-connect.json                  453.0 ± 0%   453.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-default.json                  379.0 ± 0%   379.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-disconnect.json               370.0 ± 0%   370.0 ± 0%       ~ (p=0.474 n=10)
api-gateway.json                                    791.0 ± 0%   791.0 ± 0%       ~ (p=0.303 n=10)
application-load-balancer.json                      352.0 ± 0%   353.0 ± 0%  +0.28% (p=0.000 n=10)
cloudfront.json                                     284.0 ± 0%   284.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudwatch-events.json                              220.0 ± 0%   220.0 ± 0%       ~ (p=1.000 n=10)
cloudwatch-logs.json                                215.5 ± 0%   215.5 ± 0%       ~ (p=1.000 n=10)
custom.json                                         168.0 ± 0%   168.0 ± 0%       ~ (p=1.000 n=10)
dynamodb.json                                       589.0 ± 0%   589.0 ± 0%       ~ (p=0.365 n=10)
empty.json                                          160.0 ± 1%   160.0 ± 1%       ~ (p=1.000 n=10)
eventbridge-custom.json                             254.0 ± 0%   254.0 ± 0%       ~ (p=1.000 n=10)
http-api.json                                       432.0 ± 0%   432.0 ± 0%       ~ (p=0.365 n=10)
kinesis-batch.json                                  390.0 ± 0%   390.0 ± 0%       ~ (p=0.837 n=10)
kinesis.json                                        284.5 ± 0%   285.0 ± 0%       ~ (p=0.141 n=10)
s3.json                                             357.0 ± 0%   358.0 ± 1%       ~ (p=0.707 n=10)
sns-batch.json                                      455.0 ± 0%   455.0 ± 0%       ~ (p=0.408 n=10)
sns.json                                            322.5 ± 0%   322.5 ± 0%       ~ (p=1.000 n=10)
snssqs.json                                         450.0 ± 0%   450.0 ± 0%       ~ (p=0.810 n=10)
snssqs_no_dd_context.json                           399.0 ± 0%   400.0 ± 0%       ~ (p=0.181 n=10)
sqs-aws-header.json                                 273.5 ± 1%   274.0 ± 0%       ~ (p=0.685 n=10)
sqs-batch.json                                      503.0 ± 0%   503.0 ± 0%       ~ (p=0.541 n=10)
sqs.json                                            351.5 ± 0%   351.0 ± 1%       ~ (p=0.148 n=10)
sqs_no_dd_context.json                              324.0 ± 1%   324.0 ± 1%       ~ (p=0.941 n=10)
geomean                                             376.6        376.8       +0.04%
¹ all samples are equal

@adel121
Copy link
Contributor Author

adel121 commented Aug 20, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Aug 20, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 22m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 0318c75 into main Aug 20, 2024
242 checks passed
@dd-mergequeue dd-mergequeue bot deleted the adelhajhassan/add_k8s_resources_labels_and_annotations_as_tags branch August 20, 2024 08:35
truthbk pushed a commit that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants