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

Xcframework generation #223

Closed
wants to merge 25 commits into from
Closed

Xcframework generation #223

wants to merge 25 commits into from

Conversation

bryce-b
Copy link
Contributor

@bryce-b bryce-b commented May 24, 2024

  • This PR Obfuscates many dependencies using @_implementationOnly to prevent issues in generating binary artifacts.
    • OpenTelemetryAPI is the only dependency exposed, but this requires library evolution enabled.
  • Merges memory and cpu sampling libraries into the ElasticApm library.
  • enables library evolution
  • added xcodegen yaml to support xcframework generation.

issues to resolve:

  • AgentConfigBuilder was exposing implementation details of the OpenTelemetrySDK through the filter configs: ReadableSpan, ReadableLogRecord, and metric.
  • PersistencePerformancePreset is exposed from the PersistantExporter in InstrumentationConfigBuilder.
  • accessors need to be cleaned up in InstrumentationConfiguration.swift

the removal of extra libraries in the swift package means the 'ElasticApm' target no longer needs to be seperately distinguished by xcodebuild
@bryce-b bryce-b force-pushed the xcframework-generation branch 2 times, most recently from 562986e to 1c1f574 Compare May 24, 2024 21:21
refactored config to not use PersistentExporter classes in public APIs
@bryce-b bryce-b force-pushed the xcframework-generation branch 10 times, most recently from a0f2fb1 to 13e8e31 Compare May 30, 2024 21:24
@bryce-b bryce-b force-pushed the xcframework-generation branch 4 times, most recently from e052d52 to cb78116 Compare June 3, 2024 16:07
@bryce-b bryce-b force-pushed the xcframework-generation branch 2 times, most recently from 1fd4bef to de9913d Compare June 3, 2024 16:52
@bryce-b bryce-b force-pushed the xcframework-generation branch 11 times, most recently from 2f6365a to 124f9c9 Compare June 4, 2024 22:09
---
name: xcframework builder
on:
workflow_dispatch:
Copy link
Member

Choose a reason for hiding this comment

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

ident of 4 spaces rather than 2

tar -czf "./dist/ElasticApm_macOS-${APP_VERSION}.tar.gz" -C ./package ElasticApm_macOS.xcframework
tar -czf "./dist/ElasticApm_iOS-${APP_VERSION}.tar.gz" -C ./package ElasticApm_iOS.xcframework
- name: Generate framework provenance
uses: actions/attest-build-provenance@173725a1209d09b31f9d30a3890cf2757ebbff0d # v1.1.2
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
uses: actions/attest-build-provenance@173725a1209d09b31f9d30a3890cf2757ebbff0d # v1.1.2
uses: actions/attest-build-provenance@49df96e17e918a15956db358890b08e61c704919 # v1.2.0

xcode-version: latest-stable
- uses: actions/checkout@v4
- name: xcodegen
uses: bryce-b/xcodegen-action@patch-1
Copy link
Member

Choose a reason for hiding this comment

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

Pinned version instead?

Comment on lines +19 to +28
- uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: latest-stable
- uses: actions/checkout@v4
- name: xcodegen
uses: bryce-b/xcodegen-action@patch-1
with:
spec: project.yml
quiet: false
version: '2.41.0'
Copy link
Member

Choose a reason for hiding this comment

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

I see this pattern in a few places, do you want me to refactor it using a GitHub composite action? I can contribute to your PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@v1v hold of of this for now. I've run into a blocker with the deployed artifact that may prevent this PR from going forward. I'm going to close this PR for now. We can also close https://github.com/elastic/observability-robots/issues/2223.

@bryce-b bryce-b closed this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants