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

Added OpenTelemetry REST endpoint for external systems to store logs in Salesforce #767

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jongpie
Copy link
Owner

@jongpie jongpie commented Sep 18, 2024

Resolved #635 by adding a new LoggerRestResource Apex class that can be called by external systems to store external logging data in Salesforce, using OpenTelemetry's logs data model.

For now, this only includes the ability to store logging data, and only a handful of attributes are supported. Future releases will include:

  • Support for populating more attributes, which will then be stored in mapped fields in Log__c and LogEntry__c
  • Support for more HTTP verbs & endpoints: I started working on adding other endpoints, like a GET endpoint that could be used to also retrieve logging data from Salesforce in OpenTelemetry (OTel) format, but the complexity was growing with that effort, so I'll revisit it in a separate PR/release

…external systems to store logging data in Salesforce, using OpenTelemetry's logs data model
@jongpie jongpie added Type: Enhancement New feature or request Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Logging Source: API Items related to using Nebula Logger via REST API Feature: OpenTelemetry Support Items to related to supporting OpenTelemetry (OTel) and its standards for observability data labels Sep 18, 2024
@jongpie jongpie temporarily deployed to Advanced Scratch Org September 18, 2024 14:24 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Event Monitoring Scratch Org September 18, 2024 14:24 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to OmniStudio Scratch Org September 18, 2024 14:37 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Platform Cache Scratch Org September 18, 2024 14:38 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org September 18, 2024 14:50 — with GitHub Actions Inactive
…apped traceId to transactionId, and added more attributes for browser fields, HttpRequest fields, and HttpResponse fields
@jongpie jongpie temporarily deployed to Advanced Scratch Org September 20, 2024 02:52 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Event Monitoring Scratch Org September 20, 2024 02:52 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Platform Cache Scratch Org September 20, 2024 03:05 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to OmniStudio Scratch Org September 20, 2024 03:08 — with GitHub Actions Inactive
@jongpie jongpie temporarily deployed to Experience Cloud Scratch Org September 20, 2024 03:13 — with GitHub Actions Inactive
Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 92.16867% with 26 lines in your changes missing coverage. Please review.

Project coverage is 92.24%. Comparing base (1629291) to head (2d5e814).

Files with missing lines Patch % Lines
...main/log-management/classes/LoggerRestResource.cls 92.07% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #767      +/-   ##
==========================================
- Coverage   92.24%   92.24%   -0.01%     
==========================================
  Files          74       75       +1     
  Lines        7211     7541     +330     
  Branches      199      199              
==========================================
+ Hits         6652     6956     +304     
- Misses        531      557      +26     
  Partials       28       28              
Flag Coverage Δ
Apex 94.12% <92.14%> (-0.12%) ⬇️
LWC 83.26% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: OpenTelemetry Support Items to related to supporting OpenTelemetry (OTel) and its standards for observability data Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Logging Source: API Items related to using Nebula Logger via REST API Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an Apex RestResource class provide logging capabilities to external inbound integrations
2 participants