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

LogEntryEvent__e.HttpRequestEndpoint__c too short to store endpoint #768

Closed
ILambuRI opened this issue Sep 20, 2024 · 5 comments · Fixed by #773
Closed

LogEntryEvent__e.HttpRequestEndpoint__c too short to store endpoint #768

ILambuRI opened this issue Sep 20, 2024 · 5 comments · Fixed by #773
Assignees
Labels
Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Type: Bug Something isn't working

Comments

@ILambuRI
Copy link

ILambuRI commented Sep 20, 2024

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

v4.13.10

New Bug Summary

I send a HTTP request with long get parameters in the URL and I am receiving this email:

Logger failed to save 1 LogEntryEvent__e records for [[email protected]] (Schema.User ID: 123)

Errors:
StatusCode: STRING_TOO_LONG, Message: Value too long for field, Field(s): [HttpRequestEndpoint__c]
@ILambuRI ILambuRI added the Type: Bug Something isn't working label Sep 20, 2024
@ILambuRI
Copy link
Author

ILambuRI commented Sep 20, 2024

A temporary fix if you have the same problem:
this.logEntryEvent.HttpRequestEndpoint__c = request.getEndpoint()?.left(255);
image

@jongpie
Copy link
Owner

jongpie commented Sep 25, 2024

Thanks @ILambuRI for reporting this! Just for my own reference, could you tell me how long the endpoint is in your particular example? You don't have to provide me with the actual value, but I'm curious exactly how long the endpoint is when you encounter this issue.

And since the existing endpoint field it too short, and it's a text(255) field, I can't increase the field length of the existing field - I think this will have to be fixed by introducing new long textarea fields (similar to what I did in release v4.13.15 for the old BrowserUrl__c field):

  • HttpRequestEndpoint__c --> replace with new long textarea HttpRequestEndpointAddress__c

For the existing HttpRequestEndpoint__c field, it'll still be supported/populated with a truncated value for, but I'll consider it deprecated (and it'll eventually be removed, but I don't have a specific timeline for doing that).

@jongpie jongpie self-assigned this Sep 25, 2024
@jongpie jongpie added Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine labels Sep 25, 2024
jongpie added a commit that referenced this issue Sep 25, 2024
…ryEvent__e and LogEntry__c, and replaced them with new HttpRequestEndpointAddress__c fields that have a much longer max length (2,000 vs 255)

Also updated LogEntryEventBuilder to auto-truncate both event fields HttpRequestEndpoint__c and HttpRequestEndpointAddress__c
@jongpie jongpie changed the title LogEntryEvent__e.HttpRequestEndpoint__c to short to store endpoint LogEntryEvent__e.HttpRequestEndpoint__c too short to store endpoint Sep 25, 2024
@jongpie
Copy link
Owner

jongpie commented Sep 27, 2024

@ILambuRI I went ahead and released a fix for this in release v4.14.12, with 2 main parts:

  1. The value of HttpRequestEndpoint__c is now auto-truncated (same idea as what you show in your comment)
  2. HttpRequestEndpoint__c is now considered deprecated (but still populated) - there's now a new field LogEntry__c.HttpRequestEndpointAddress__c that can store 2,000 characters

If it's easy for you to get the info, I'd still be curious to know the length of the endpoint you were using when you encountered this issue - my hope is that 2,000 characters should be plenty for storing endpoints/URLs, but I can still adjust the length of the field in future releases if needed.

@ILambuRI
Copy link
Author

ILambuRI commented Oct 7, 2024

@ILambuRI I went ahead and released a fix for this in release v4.14.12, with 2 main parts:

  1. The value of HttpRequestEndpoint__c is now auto-truncated (same idea as what you show in your comment)
  2. HttpRequestEndpoint__c is now considered deprecated (but still populated) - there's now a new field LogEntry__c.HttpRequestEndpointAddress__c that can store 2,000 characters

If it's easy for you to get the info, I'd still be curious to know the length of the endpoint you were using when you encountered this issue - my hope is that 2,000 characters should be plenty for storing endpoints/URLs, but I can still adjust the length of the field in future releases if needed.

Hi @jongpie , thx for the fast fix!
I'm using a pre-signed AWS S3 Bucket URL and it's around 1500-1600 characters.
image

@jongpie
Copy link
Owner

jongpie commented Oct 7, 2024

@ILambuRI awesome, thanks for the info! It sounds like the 2,000 characters I used for LogEntry__c.HttpRequestEndpointAddress__c should be enough, so I'll leave the length as-is for now. If/when it needs to be increased further, I can do that in a separate release.

Thanks again for your help with this! Let me know if you run into any more issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Layer: Log Management Items related to the custom objects & Logger Console app Layer: Logger Engine Items related to the core logging engine Salesforce Feature: Reporting Anything related to reports, dashboards, and the underlying data model Type: Bug Something isn't working
Projects
None yet
2 participants