Skip to content

update docs related to V2 config #1287

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 8 commits into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A clear and concise description of what you want to achieve and implement. For e
> We can use the package `github.com/gosnmp/gosnmp` to act as an snmp server in a gesture to collect client logs.

**Additional comments**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
For example, the ideal input and output logs.
> The logs are supposed to have the following contents, e.g.,
>
Expand Down
5 changes: 5 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"MD013": false,
"MD024": {"siblings_only": true},
"MD033": false
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ your changes, such as:
## [Unreleased]

- [public] [both] [added] add UsingOldContentTag. When UsingOldContentTag is set to false, the Tag is now placed in the Meta instead of Logs during cgo.
- [public] [both] [added] Env control using the new configuration
- [public] [both] [added] Env control using the new configuration
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

Alibaba has adopted a Code of Conduct that we expect project participants to adhere to.

Please refer to [Alibaba Open Source Code of Conduct](https://github.com/AlibabaDR/community/blob/master/CODE_OF_CONDUCT.md) ([中文版](https://github.com/AlibabaDR/community/blob/master/CODE_OF_CONDUCT_zh.md)).
Please refer to [Alibaba Open Source Code of Conduct](https://github.com/AlibabaDR/community/blob/master/CODE_OF_CONDUCT.md) ([中文版](https://github.com/AlibabaDR/community/blob/master/CODE_OF_CONDUCT_zh.md)).
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Our official **User Manual** is located here:

[Configuration](https://ilogtail.gitbook.io/ilogtail-docs/configuration/collection-config)

[All Plugins](https://ilogtail.gitbook.io/ilogtail-docs/data-pipeline/overview)
[All Plugins](https://ilogtail.gitbook.io/ilogtail-docs/plugins/overview)

[Getting Started](https://ilogtail.gitbook.io/ilogtail-docs/awesome-ilogtail/getting-started)

Expand Down Expand Up @@ -105,4 +105,3 @@ Tens of thousands of companies use iLogtail in Alibaba Cloud, IDC, or other clou
## Licence

[Apache 2.0 License](./LICENSE)

28 changes: 14 additions & 14 deletions core/app_config/AppConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ DEFINE_FLAG_STRING(logtail_sys_conf_dir, "store machine-unique-id, user-defined-
#elif defined(_MSC_VER)
DEFINE_FLAG_STRING(logtail_sys_conf_dir, "store machine-unique-id, user-defined-id, aliuid", "C:\\LogtailData\\");
#endif
const char* DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE = "user_local_config.json";
DEFINE_FLAG_STRING(ilogtail_local_config, "local ilogtail config file", DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE);
const char* DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE = "user_config.d";
DEFINE_FLAG_STRING(ilogtail_local_config_dir,
"local ilogtail config file dir",
DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE);
// const char* DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE = "user_local_config.json";
// DEFINE_FLAG_STRING(ilogtail_local_config, "local ilogtail config file", DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE);
// const char* DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE = "user_config.d";
// DEFINE_FLAG_STRING(ilogtail_local_config_dir,
// "local ilogtail config file dir",
// DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE);
// const char* DEFAULT_ILOGTAIL_LOCAL_YAML_CONFIG_DIR_FLAG_VALUE = "user_yaml_config.d";
// DEFINE_FLAG_STRING(ilogtail_local_yaml_config_dir,
// "local ilogtail yaml config file dir",
Expand Down Expand Up @@ -1191,14 +1191,14 @@ void AppConfig::SetLogtailSysConfDir(const std::string& dirPath) {
#endif

// Update related configurations (local user config).
if (STRING_FLAG(ilogtail_local_config).empty()) {
LOG_WARNING(sLogger, ("flag error", "ilogtail_local_config must be non-empty"));
STRING_FLAG(ilogtail_local_config) = DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE;
}
if (STRING_FLAG(ilogtail_local_config_dir).empty()) {
LOG_WARNING(sLogger, ("flag error", "ilogtail_local_config_dir must be non-empty"));
STRING_FLAG(ilogtail_local_config_dir) = DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE;
}
// if (STRING_FLAG(ilogtail_local_config).empty()) {
// LOG_WARNING(sLogger, ("flag error", "ilogtail_local_config must be non-empty"));
// STRING_FLAG(ilogtail_local_config) = DEFAULT_ILOGTAIL_LOCAL_CONFIG_FLAG_VALUE;
// }
// if (STRING_FLAG(ilogtail_local_config_dir).empty()) {
// LOG_WARNING(sLogger, ("flag error", "ilogtail_local_config_dir must be non-empty"));
// STRING_FLAG(ilogtail_local_config_dir) = DEFAULT_ILOGTAIL_LOCAL_CONFIG_DIR_FLAG_VALUE;
// }
// mUserLocalConfigPath = AbsolutePath(STRING_FLAG(ilogtail_local_config), mLogtailSysConfDir);
// mUserLocalConfigDirPath = AbsolutePath(STRING_FLAG(ilogtail_local_config_dir), mLogtailSysConfDir) +
// PATH_SEPARATOR; mUserLocalYamlConfigDirPath
Expand Down
14 changes: 14 additions & 0 deletions core/application/Application.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 iLogtail Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "application/Application.h"

#ifndef LOGTAIL_NO_TC_MALLOC
Expand Down
16 changes: 16 additions & 0 deletions core/application/Application.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2023 iLogtail Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <atomic>
Expand Down
9 changes: 2 additions & 7 deletions core/common/TimeUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,20 +389,15 @@ bool ParseTimeZoneOffsetSecond(const std::string& logTZ, int& logTZSecond) {
return true;
}

bool ParseLogTimeZoneOffsetSecond(const std::string& logTZ, bool isAdjustmentNeeded, int& logTimeZoneOffsetSecond) {
bool ParseLogTimeZoneOffsetSecond(const std::string& logTZ, int& logTimeZoneOffsetSecond) {
if (logTZ.empty()) {
return true;
}
int logTZSecond = 0;
if (!ParseTimeZoneOffsetSecond(logTZ, logTZSecond)) {
return false;
} else {
if (isAdjustmentNeeded) {
logTimeZoneOffsetSecond = logTZSecond - GetLocalTimeZoneOffsetSecond();
} else {
logTimeZoneOffsetSecond = logTZSecond;
}
}
logTimeZoneOffsetSecond = logTZSecond - GetLocalTimeZoneOffsetSecond();
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion core/common/TimeUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ uint64_t GetPreciseTimestamp(uint64_t secondTimestamp,
const PreciseTimestampConfig& preciseTimestampConfig);
bool ParseTimeZoneOffsetSecond(const std::string& logTZ, int& logTZSecond);

bool ParseLogTimeZoneOffsetSecond(const std::string& logTZ, bool isAdjustmentNeeded, int& logTimeZoneOffsetSecond);
bool ParseLogTimeZoneOffsetSecond(const std::string& logTZ, int& logTimeZoneOffsetSecond);

} // namespace logtail
4 changes: 2 additions & 2 deletions core/deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
- [liblz4](https://github.com/lz4/lz4): v1.8.3
- [zlib](https://zlib.net/): v1.2.11
- libuuid
- get_dmi_uuid
- get_dmi_uuid
- libpthread
- libdl
- libdl
14 changes: 14 additions & 0 deletions core/monitor/LogtaiMetric.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 iLogtail Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "LogtailMetric.h"
#include "common/StringTools.h"
#include "MetricConstants.h"
Expand Down
16 changes: 16 additions & 0 deletions core/monitor/LogtailMetric.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2023 iLogtail Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <string>
#include <atomic>
Expand Down
14 changes: 14 additions & 0 deletions core/monitor/MetricConstants.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 iLogtail Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "MetricConstants.h"

namespace logtail {
Expand Down
14 changes: 14 additions & 0 deletions core/monitor/MetricExportor.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 iLogtail Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "MetricExportor.h"
#include "sender/Sender.h"
#include "log_pb/sls_logs.pb.h"
Expand Down
16 changes: 16 additions & 0 deletions core/monitor/MetricExportor.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2023 iLogtail Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include "profile_sender/ProfileSender.h"
Expand Down
14 changes: 14 additions & 0 deletions core/observer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 iLogtail Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.10)
project(observer)

Expand Down
14 changes: 14 additions & 0 deletions core/observer/interface/global.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 iLogtail Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
// Created by evan on 2022/10/19.
//
Expand Down
16 changes: 16 additions & 0 deletions core/observer/interface/global.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2023 iLogtail Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once
#include <string>

Expand Down
14 changes: 14 additions & 0 deletions core/observer/interface/layerfour.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2023 iLogtail Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
// Created by evan on 2022/10/17.
//
Expand Down
16 changes: 16 additions & 0 deletions core/observer/interface/layerfour.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2023 iLogtail Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <cstdint>
Expand Down
14 changes: 14 additions & 0 deletions core/observer/network/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 iLogtail Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.10)

add_subdirectory(protocols)
14 changes: 14 additions & 0 deletions core/observer/network/protocols/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2023 iLogtail Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 3.10)

add_subdirectory(dns)
Expand Down
Loading