Skip to content

feat: Inline context for custom events #477

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Include full context in custom events and update to inline-context-all capability

Description

This PR updates the C++ SDKs to include the full context in custom events instead of just context keys. It also updates the contract test capabilities to use inline-context-all instead of inline-context.

Changes

  • Updated TrackEvent serialization to include full context instead of context keys
  • Updated TrackEventParams struct to use Context instead of ContextKeys
  • Updated client and server implementations to use full context
  • Updated contract test capabilities to use inline-context-all

Testing

  • Changes will be verified by CI tests

Link to Devin run

https://app.devin.ai/sessions/6315fa1653c84dcc931a5b3ec6485a64

Requested by

[email protected]

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner May 8, 2025 13:57
Copy link
Contributor Author

Original prompt from [email protected]:

Received message in Slack channel #sdk-tools:

@Devin I need you to make the same type of change across three different repositories -- erlang-server-sdk, flutter-client-sdk, and the cpp-sdks repository.

When we generate custom events (and migration op events if supported), we JSON encode the event to only include the context keys, not the full context. Please update those repositories so that custom and migration events include the full context.

For reference, you can look at the follow commits. This is prior work where we inlined the context for other events in those repositories.

erlang: e5c6cc4da4cd6dc59326bb5fa0b0a75864c72bc7
flutter: b2ebcbfd8c3c817595821f91ffb7ac02687bb41f
cpp: bc77e89d1bf5b2294e2b384363b32734fd1f75db

You can also look at <https://github.com/launchdarkly/ruby-server-sdk/commit/ab5b14fff2f04f1dfa7e6f61669bc348fffb5cac> which shows how we inlined contexts for custom and migration events in ruby.

When doing this work, please make sure to update all the unit tests. Also check for any code that is now unused as a result of the change.

In the contract tests for these repositories, replace the inline-context capability with inline-context-all.

When making the PRs, name as follows:

- erlang :: mk/sdk-1156/inline-contexts
- flutter :: mk/sdk-1165/inline-contexts
- cpp :: mk/sdk-1157/inline-contexts

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@keelerm84 keelerm84 changed the title Include full context in custom events and update to inline-context-all capability feat: Inline context for custom events May 8, 2025
Copy link
Contributor Author

Closing due to inactivity for more than 7 days.

@keelerm84 keelerm84 force-pushed the mk/sdk-1157/inline-contexts branch from 655804a to 8dc76a7 Compare May 23, 2025 17:53
@keelerm84 keelerm84 merged commit 6a96b13 into main Jun 4, 2025
24 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-1157/inline-contexts branch June 4, 2025 16:39
@github-actions github-actions bot mentioned this pull request Jun 4, 2025
keelerm84 pushed a commit that referenced this pull request Jun 4, 2025
🤖 I have created a release *beep* *boop*
---


<details><summary>launchdarkly-cpp-client: 3.10.0</summary>

##
[3.10.0](launchdarkly-cpp-client-v3.9.0...launchdarkly-cpp-client-v3.10.0)
(2025-06-04)


### Features

* Inline context for custom events
([#477](#477))
([6a96b13](6a96b13))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * launchdarkly-cpp-internal bumped from 0.11.0 to 0.12.0
</details>

<details><summary>launchdarkly-cpp-internal: 0.12.0</summary>

##
[0.12.0](launchdarkly-cpp-internal-v0.11.0...launchdarkly-cpp-internal-v0.12.0)
(2025-06-04)


### Features

* Inline context for custom events
([#477](#477))
([6a96b13](6a96b13))
</details>

<details><summary>launchdarkly-cpp-server: 3.9.0</summary>

##
[3.9.0](launchdarkly-cpp-server-v3.8.2...launchdarkly-cpp-server-v3.9.0)
(2025-06-04)


### Features

* Inline context for custom events
([#477](#477))
([6a96b13](6a96b13))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * launchdarkly-cpp-internal bumped from 0.11.0 to 0.12.0
</details>

<details><summary>launchdarkly-cpp-server-redis-source: 2.1.19</summary>

##
[2.1.19](launchdarkly-cpp-server-redis-source-v2.1.18...launchdarkly-cpp-server-redis-source-v2.1.19)
(2025-06-04)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * launchdarkly-cpp-server bumped from 3.8.2 to 3.9.0
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants