Logo

dev-resources.site

for different kinds of informations.

Integrating Keycloak with Datadog: Enabling Keycloak Traces in Kubernetes using Datadog APM

Published at
3/31/2024
Categories
keycloak
datadog
apm
monitoring
Author
mohammedalics
Categories
4 categories in total
keycloak
open
datadog
open
apm
open
monitoring
open
Author
13 person written this
mohammedalics
open
Integrating Keycloak with Datadog: Enabling Keycloak Traces in Kubernetes using Datadog APM

Keycloak is an open-source identity and access management solution that allows users to authenticate and authorize access to web applications and services.
Datadog is a monitoring and analytics platform that provides insights into the performance and health of your applications and infrastructure. By integrating Keycloak with Datadog, you can gain visibility into the performance of your authentication and authorization processes.

In this blog post, we will describe how to configure Keycloak to send traces to Datadog when both are deployed in Kubernetes.

Prerequisites

  • A Kubernetes cluster with Keycloak and Datadog agents deployed

  • A Datadog API key

Enable tracing in Keycloak
Quarkus is a modern Java framework that is designed for building lightweight and efficient microservices. As Keycloak (starting version 17) is based on Quarkus, we should consider the Datadog Java Agent in our integration.

Start a Keycloak instance with custom command-line options
Additional server startup options (extension of JAVA_OPTS) can be configured using the JAVA_OPTS_APPEND environment variable.

ARG KC_VERSION

FROM quay.io/keycloak/keycloak:${KC_VERSION} as builder

ARG KC_HEALTH_ENABLED=true
ARG KC_METRICS_ENABLED=true
ARG KC_DB=postgres
ARG KC_FEATURES

ENV KC_HEALTH_ENABLED=${KC_HEALTH_ENABLED}
ENV KC_METRICS_ENABLED=${KC_METRICS_ENABLED}
ENV KC_DB=${KC_DB}
ENV KC_FEATURES=${KC_FEATURES}

COPY /jars/dd-java-agent.jar /jars/dd-java-agent.jar 

ENV JAVA_OPTS_APPEND=-javaagent:/jars/dd-java-agent.jar -Ddd.service.name=keycloak -Ddd.env=prod  

FROM quay.io/keycloak/keycloak:${KC_VERSION}

COPY --from=builder /opt/keycloak/ /opt/keycloak/

ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start", "--optimized"]

Enter fullscreen mode Exit fullscreen mode

That is all. I hope you find it useful.

datadog Article's
30 articles in total
Favicon
Distributed Tracing in Microservices: AWS X-Ray vs DataDog
Favicon
Understanding Datadog: Monitoring and Observability for Modern Applications
Favicon
Golang: Como a observabilidade e profiling revelaram um throttling quase indetectável
Favicon
Datadog : how to filter metrics on tag "team"
Favicon
Self-Healing and Monitoring: A comprehensive guide to revolutionizing System Resilience Through Automation
Favicon
Setting Up Datadog Agent for Nginx Log Collection on AWS EC2
Favicon
How to Monitor your AWS EC2/Workspace with Datadog
Favicon
Getting Started with DataDog's APM: A Developer's Guide
Favicon
Integrating Keycloak with Datadog: Enabling Keycloak Traces in Kubernetes using Datadog APM
Favicon
Monitor EC2 instance metrics with Datadog (step-by-step)
Favicon
Datadog PHP APM filtering
Favicon
Datadog Resource Inventory
Favicon
The Saga of the Replica Lag
Favicon
Send the logs of your Shuttle-powered backend to Datadog
Favicon
Monitoring SQS with Datadog
Favicon
Forecast log costs pre-production
Favicon
Datadog-Cloudformation Integration using Serverless Framework
Favicon
Datadog Alternative: When to Move Out?
Favicon
New dog is ready to rock
Favicon
Datadog vs New Relic: A Duel for Dominance in LLM Observability Platforms
Favicon
Quick tip: Monitoring SingleStoreDB Cloud using Datadog
Favicon
Full Stack Observability: Connecting AWS with Datadog
Favicon
Jump into Datadog With AWS Serverless CDK App
Favicon
How to use DataDog to find utilisation of AWS EBS volume
Favicon
Monitorando RabbitMQ implantado no Kubernetes como Cluster Operator com Datadog Autodiscovery
Favicon
Find your application's hidden secrets using opentelemetry
Favicon
Datadog - export more than 5000 records.
Favicon
Send the logs of your Shuttle-powered backend to Datadog (outdated)
Favicon
CockroachDB: trace logging with Datadog
Favicon
CI/CD con Synthetic Monitoring de Datadog y Bitbucket pipelines

Featured ones: