Skip to content

Implement OpAMP remote config parsing and vendor customizations (#272)#381

Merged
intuibase merged 3 commits into
elastic:mainfrom
intuibase:opamp_polling_interval
May 12, 2026
Merged

Implement OpAMP remote config parsing and vendor customizations (#272)#381
intuibase merged 3 commits into
elastic:mainfrom
intuibase:opamp_polling_interval

Conversation

@intuibase

@intuibase intuibase commented May 12, 2026

Copy link
Copy Markdown
Contributor
  • JSON parsing and option remapping in ElasticConfigProvider (logging_level, infer_spans, opamp_polling_interval) with level translation and duration unit handling
  • Implement ElasticVendor::setLogger() and getAdditionalResourceAttributes()
  • Fix ElasticRemoteConfigParser: class aliasing, native-side option handling, relative log path, all log level sinks mapped

updated upstream adding improved OpAMP remote config handling

@intuibase intuibase self-assigned this May 12, 2026
@intuibase
intuibase requested a review from SergeyKleyman May 12, 2026 13:54
@intuibase intuibase linked an issue May 12, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Rate limit exceeded

@intuibase has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 27 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 478a906e-2998-480b-9e55-1dd1f8cb9a55

📥 Commits

Reviewing files that changed from the base of the PR and between ecdf0aa and 91e8276.

📒 Files selected for processing (1)
  • elastic_prod/native/libelastic/ElasticConfigProvider.cpp
📝 Walkthrough

Walkthrough

This PR extends the Elastic OpenTelemetry PHP extension to parse and apply remote configuration delivered via OpAMP. Native C++ code in ElasticConfigProvider adds JSON parsing logic to convert OpAMP remote config payloads into dynamic option values, with specific key remapping for OpenTelemetry PHP settings. ElasticVendor caches the config provider and delegates logger setup. The PHP-side ElasticRemoteConfigParser gains enhanced diagnostic logging with call-site context across all configuration methods. Build configuration is updated to include the nlohmann_json dependency, and the upstream subproject reference is bumped.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@elastic_prod/native/libelastic/ElasticConfigProvider.cpp`:
- Around line 144-145: There is a duplicate assignment to
result[STRINGIFY_HELPER(OTEL_PHP_LOG_LEVEL)] in ElasticConfigProvider.cpp;
replace the redundant second assignment so it assigns the intended variant
(e.g., STRINGIFY_HELPER(OTEL_PHP_LOG_LEVEL_STDERR) or the appropriate
_STDERR/_SYSLOG/_FILE variant consistent with the subsequent lines) instead of
overwriting the same key; update the line that currently duplicates
STRINGIFY_HELPER(OTEL_PHP_LOG_LEVEL) to use the correct target key while keeping
the value loglevel and leaving the surrounding result[...] assignments
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 8a3bda56-a2e1-41a9-b948-b915cebba9ba

📥 Commits

Reviewing files that changed from the base of the PR and between 8395d93 and ecdf0aa.

📒 Files selected for processing (7)
  • elastic_prod/native/libelastic/ElasticConfigProvider.cpp
  • elastic_prod/native/libelastic/ElasticConfigProvider.h
  • elastic_prod/native/libelastic/ElasticVendor.cpp
  • elastic_prod/native/libelastic/ElasticVendor.h
  • elastic_prod/native/libelastic/elastic_vendor_inject.cmake
  • elastic_prod/php/Elastic/OTel/OpAmp/ElasticRemoteConfigParser.php
  • upstream

Comment thread elastic_prod/native/libelastic/ElasticConfigProvider.cpp Outdated
@intuibase
intuibase merged commit 9d2a918 into elastic:main May 12, 2026
68 checks passed
@intuibase
intuibase deleted the opamp_polling_interval branch May 12, 2026 14:59
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.

[EDOT PHP] opamp_polling_interval

2 participants