datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

[Serverless] add isError flag to channelMessage

Open maxday opened this issue 3 years ago • 3 comments

What does this PR do?

This PR adds IsError field to the ChannelMessage structure. Before all message were set with status info but in some case, we want to tag message as error right away, for instance if we know that these are coming from stderr

Screen Shot 2022-08-09 at 2 45 49 PM

Motivation

Set the correct level in message

Describe how to test/QA your changes

Unit test

Reviewer's Checklist

  • [ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • [ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • [ ] A release note has been added or the changelog/no-changelog label has been applied.
  • [ ] Changed code has automated tests for its functionality.
  • [ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • [ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • [ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • [ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
  • [ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • [ ] If applicable, the config template has been updated.

maxday avatar Aug 09 '22 18:08 maxday

Would it make sense to instead expose the full status field, so that any of the available levels can be set?

vickenty avatar Aug 10 '22 10:08 vickenty

Would it make sense to instead expose the full status field, so that any of the available levels can be set?

Sure! I can do the modification, the only downside of that is we could pass invalid status such as 'blablabla' WDYT?

maxday avatar Aug 10 '22 17:08 maxday

Good point! If there is no foreseeable need for more status options, what you have now in the PR might be better.

vickenty avatar Aug 11 '22 09:08 vickenty