Skip to content

SAP Cloud Logging ​

Store and analyze application logs, metrics, and traces based on OpenSearch.

SAP Cloud Logging service is an instance-based observability service that builds upon OpenSearch to store, visualize, and analyze application logs, metrics, and traces from SAP BTP Cloud Foundry, Kyma, Kubernetes and other runtime environments. For Cloud Foundry and Kyma, it offers an easy integration by providing predefined contents to investigate load, latency, and error rates of the observed applications based on their requests and correlate them with additional data. From Application Logging to Cloud Logging: Service Innovation Guide

SAP Cloud Logging
FeatureDescription
Store observability dataStore observability data from SAP BTP workloads. Ingest logs, metrics, and traces via OpenTelemetry format API. Ingest observability data via JSON format API. Ingest application logs and request logs emitted by Cloud Foundry.
Configure retentionPersist the ingested observability data for a configurable retention period. Note: This is overruled by size-based curation when the disk runs full.
View, search, and analyze dataView, search, filter, and analyze observability data in a web-based user interface using predefined dashboards.
Create custom dashboardsBuild and persist custom dashboards to analyze your observability data tailored to your specific requirements.
Configure notificationsConfigure customized notifications derived from the observability data of your applications.
Manage accessEnable management of users and group-based access using SAP Identity Authentication Service.

How to get started?

Find relevant SAP Community Blogs.

Cloud Logging vs Application Logging (deprecated) ​

🚧 = Roadmap

Feature / CapabilitiesCloud LoggingApplication Logging
πŸ”Ή SAP BTP Runtimes
Cloud Foundryβœ…βœ…
Kymaβœ…βŒ
Other (public endpoints)βœ…βŒ
Cross-runtimeβœ…βŒ
πŸ”Ή Signal Types
Logsβœ…βœ…
Metrics (custom)βœ…βŒ
Cloud Foundry container metricsπŸš§βœ…
Tracesβœ…βŒ
πŸ”Ή Ingest Sources
Cloud Foundryβœ…βœ…
Kymaβœ…βŒ
Other (public endpoints)βœ…βŒ
πŸ”Ή Ingest Endpoints
CF Syslog over https (RFC5424 Syslog)βœ…βŒ
Json (https)βœ…βŒ
Open Telemetry (grpc)βœ…βŒ
Open Telemetry (https)🚧❌
πŸ”Ή Dashboarding
Cloud Foundry (pre-build)βœ…βœ…
Kyma (pre-build)βœ…βŒ
Open Telemetry (pre-build)βœ…βŒ
Custom Dashboardsβœ…βŒ
πŸ”Ή Features
Alertingβœ…βŒ
Anomaly Detectionβœ…βŒ
Logging Librariesβœ…βœ…
Instance Labellingβœ…βŒ
πŸ”Ή Storage
Custom Retention Periodβœ…βŒ
fixed 7 days
Autoscaling Storageβœ…βŒ
Autoscaling Ingestβœ…βŒ
Disk compression🚧❌
πŸ”Ή Authentication /Authorization
Cloud Foundry UAAβœ…βŒ
SAML Integrationβœ…βŒ
OIDC🚧❌
Fine-grained access-managementβœ…βŒ
Mask sensitive fieldsβœ…βŒ
πŸ”Ή Integrations
SAP Cloud ALMβœ…βŒ
Alert Notification serviceβœ…βŒ

AppRouter Extension @sap/approuter @sap/logging ​

js
const logging = require('@sap/logging');

// create SAP Logging Context
const sapLogging = logging.createLogger({ name: 'approuter' });
const sapMiddleware = logging.expressMiddleware();

function requestLogger(req, _res, next) {
  // important! mask sensible header data
  const { authorization, cookie, ...safeHeaders } = req.headers;

  const logEntry = {
    written_at: new Date().toISOString(),
    level: 'INFO',
    component: 'request',
    method: req.method,
    url: req.originalUrl,
    headers: safeHeaders,
    query: req.query,
    body: req.body // needs body-parser
  };

  // -> stdout for SAP Cloud Logging
  console.log(JSON.stringify(logEntry));

  // correlation for follow up services
  const context = req.loggingContext.getContext();
  context.setCustomField('request', logEntry);

  next();
}

module.exports = { sapMiddleware, requestLogger };

Support ​

Component NameComponent Description
BC-CP-CLSSupport component for this service