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

improve Android compatibility #1518

Merged
merged 7 commits into from
Aug 6, 2024

Conversation

alph00
Copy link
Collaborator

@alph00 alph00 commented Jun 3, 2024

No description provided.

core/common/RuntimeUtil.cpp Outdated Show resolved Hide resolved
core/dependencies.cmake Outdated Show resolved Hide resolved
core/dependencies.cmake Outdated Show resolved Hide resolved
core/logtail.cpp Outdated Show resolved Hide resolved
@henryzhx8 henryzhx8 added the enhancement Feature enhancement label Jun 17, 2024
@alph00 alph00 force-pushed the fix/android-compatibility branch from f0d9295 to 8f8b08d Compare July 26, 2024 03:02
@@ -254,6 +254,8 @@ endmacro()
macro(link_zlib target_name)
if (zlib_${LINK_OPTION_SUFFIX})
target_link_libraries(${target_name} "${zlib_${LINK_OPTION_SUFFIX}}")
elseif(ANDROID)
target_link_libraries(${target_name} z)
Copy link
Collaborator

Choose a reason for hiding this comment

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

z的含义是?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

zlib在安卓的ndk里有内置的库,库名就叫 z

core/logtail.cpp Outdated
@@ -72,7 +72,9 @@ void enable_core(void) {

static void overwrite_community_edition_flags() {
// support run in installation dir on default
#if !defined(__ANDROID__)
Copy link
Collaborator

Choose a reason for hiding this comment

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

开源也要加这个条件的必要性是?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

如果是安卓上使用开源版的话,也是需要把运行目录和运行时文件存放目录分开,否则跑不起来

Copy link
Collaborator

Choose a reason for hiding this comment

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

这个删掉吧,通过运行时脚本配置解决

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已经修改

@alph00 alph00 requested a review from messixukejia July 29, 2024 03:46
core/logtail.cpp Outdated
@@ -72,7 +72,9 @@ void enable_core(void) {

static void overwrite_community_edition_flags() {
// support run in installation dir on default
#if !defined(__ANDROID__)
STRING_FLAG(logtail_sys_conf_dir) = ".";
Copy link
Collaborator

Choose a reason for hiding this comment

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

那开源这个环境变量的值默认是商业版那个?如果是这样的话,这个值在安卓场景下应该是必填项?不填工作不了

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

目前是没有默认值,是要必填的。因为之前是把路径写到/data/data/com.example.logtail_for_android/files这个目录,这个目录直接设成默认值感觉不太合适?
或者再加一下命令行提示告知logtail_sys_conf_dir必填?

Comment on lines 39 to 42
#if defined(__ANDROID__)
return STRING_FLAG(logtail_sys_conf_dir);
#elif defined(__linux__)
Copy link
Collaborator

Choose a reason for hiding this comment

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

注释一下原因

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

已经修改

Copy link
Collaborator

@henryzhx8 henryzhx8 left a comment

Choose a reason for hiding this comment

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

有些问题再看一下

@alph00 alph00 requested a review from henryzhx8 July 30, 2024 08:50
@alph00 alph00 force-pushed the fix/android-compatibility branch from 71e1202 to 4c6456a Compare August 1, 2024 02:34
@messixukejia messixukejia merged commit fb41154 into alibaba:main Aug 6, 2024
15 checks passed
alph00 added a commit to alph00/ilogtail that referenced this pull request Aug 7, 2024
linrunqi08 pushed a commit that referenced this pull request Aug 7, 2024
henryzhx8 pushed a commit that referenced this pull request Jan 20, 2025
本次代码评审主要涉及多文件的更新,包括添加、修改和删除代码,核心目的是为了实现和优化日志处理系统的配置管理、插件系统、自定义指标记录、以及测试用例的改进。具体包括增加对时间戳格式的支持、新增和调整函数以支持插件的动态添加和配置、增强了上下文管理以及日志处理逻辑,同时优化了代码结构和提高了代码的可读性和模块化。
Link: https://code.alibaba-inc.com/sls/ilogtail/codereview/17996585
* fix unittest include and devcontainer user (#1634)

* e2e test case

* fix checkpoint dump idx in reader array (#1637)

* fix: input_kafka consumer wont close due to ctx never done. (#1615)

Co-authored-by: licht <[email protected]>

* Feat: prometheus relabel lib (#1614)

* feat: MetricEvent tags read only iterator

* feat: prometheus relabel lib

* chore: update code style

* chore: update code style

* chore: add relabel action test case

* chore: update code style

* chore: add more test case

* feat: labels hash calc

* chore: update code style

* chore: update enum Action style

* chore: use static string reference

* fix mssql latest image incompatible (#1643)

* fix: GTID Truncation Issue and Improve Consistency in Checkpoint Management (#1644)

* fix: cannot get latest GTID when size exceed 1024

* fix license

* move log to proper position

* feat: add loong collector monitor (#1636)

* add LoongCollectorMonitor

* add DoubleGauge

* add dynamicLabel

* upgrade development image (#1645)

* Merge remote-tracking branch 'opensource/main' into e2e

* suicide immediately when resource hard limit is met (#1649)

* Support config server v2 provider (#1633)

* fix

* refactor flusher runner and http sink (#1639)

* Merge remote-tracking branch 'origin/main' into e2e

* Merge remote-tracking branch 'opensource/main' into e2e

* Support MetricEvent serialize to LogGroup (#1656)

* improve Android compatibility (#1518)

* improve Android compatibility

* support flusher route for pipeline event group (#1655)

* fix processor delimiter parse double quote (#1664)

* fix delimiter parse double quote

* enable unittest coverage

* remove useless codes to improve unittest coverage

* feat: export go metrics to cpp (#1667)

* export go metric to cpp

* change metric format

* separate feedbackqueue into three distinct interfaces (#1659)

* add timer machanism (#1658)

* config server implement gorm store mode (#1400)

therefore, mysql, sqlite, postgre and sqlserver are supported

Co-authored-by: Ruoyu <[email protected]>

* add ebpf input & ut & docs, add options for Security & Observer and make below modifications:
1. modify ebpf input appconfig load method
2. ParseJsonToFlags() support recursive
3. add RecurseParseJsonToFlags ut

* 1. add ebpf server
2. add source manager

Signed-off-by: qianlu.kk <[email protected]>

* Add processor_gotime with nanosecond to other time format conversion capability (#1671)

* STC scan

* fix blacklist verify

* feat: prometheus scrape work, scrape manager, input plugin, and inner processor. (#1641)

* Merge remote-tracking branch 'origin/main' into e2e

* Merge remote-tracking branch 'upstream/main' into e2e

* support janus ci run stc

* fix ebpf input doc

* feat: Upgrade PluginID to PluginMeta (CPP part) (#1676)

* cpp plugin meta

* feat: add go process-level metric (#1673)

* add go process-level metric

* feat: Upgrade PluginID to PluginMeta (Golang part)  (#1683)

* go plugin meta

* Merge remote-tracking branch 'external/main' into e2e

* Merge remote-tracking branch 'internal/main' into e2e

* Merge remote-tracking branch 'origin/nightly' into e2e

* fix error use of timestamp (#1692)

* support circular process queue for input with pull mode (#1670)

* Add k8s meta module to support k8s meta plugin and k8s meta http server. (#1630)

* export k8s metadata through http server

* fix

* add k8s meta code

* refine code

* refine code

* add host and cidr endpoint

* add runner to plugin_export

* add runner to plugin_export

* refactor to use queue to handle meta

* fix go.mod

* tmp remove get cidr

* fix static check

* fix

* fix

* fix

* fix

* direct send when handle timer event

* doc

* unit test

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix lint

---------

Co-authored-by: abingcbc <[email protected]>

* Merge remote-tracking branch 'external/main' into e2e

* Merge remote-tracking branch 'internal/main' into e2e

* janus ci

* Merge branch 'e2e' of gitlab.alibaba-inc.com:sls/ilogtail-nightly into e2e

* test trigger janus ci

* test

* optimize test engine

* add e2e test

* fix script permission

* add enterprice E2E cases

* add build scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants