Skip to content

Commit cb87932

Browse files
committed
remove tags
1 parent 9f782a5 commit cb87932

File tree

3 files changed

+2
-62
lines changed

3 files changed

+2
-62
lines changed

core/constants/TagConstants.cpp

-30
Original file line numberDiff line numberDiff line change
@@ -79,34 +79,4 @@ const string LOG_RESERVED_KEY_TOPIC = "__topic__";
7979
const string LOG_RESERVED_KEY_MACHINE_UUID = "__machine_uuid__";
8080
const string LOG_RESERVED_KEY_PACKAGE_ID = "__pack_id__";
8181

82-
////////////////////////// METRIC ////////////////////////
83-
const string DEFAULT_METRIC_TAG_NAMESPACE = ebpf::kNamespace.MetricKey().to_string();
84-
const string DEFAULT_METRIC_TAG_POD_NAME = ebpf::kPodName.MetricKey().to_string();
85-
const string DEFAULT_METRIC_TAG_POD_UID = ebpf::kPodUid.MetricKey().to_string();
86-
const string DEFAULT_METRIC_TAG_CONTAINER_NAME = ebpf::kContainerName.MetricKey().to_string();
87-
const string DEFAULT_METRIC_TAG_CONTAINER_IP = ebpf::kContainerIp.MetricKey().to_string();
88-
const string DEFAULT_METRIC_TAG_IMAGE_NAME = ebpf::kImageName.MetricKey().to_string();
89-
90-
////////////////////////// TRACE ////////////////////////
91-
const std::string DEFAULT_TRACE_TAG_K8S_NAMESPACE = ebpf::kNamespace.SpanKey().to_string();
92-
const std::string DEFAULT_TRACE_TAG_K8S_PEER_NAMESPACE = ebpf::kPeerNamespace.SpanKey().to_string();
93-
const std::string DEFAULT_TRACE_TAG_K8S_POD_NAME = ebpf::kPodName.SpanKey().to_string();
94-
const std::string DEFAULT_TRACE_TAG_K8S_PEER_POD_NAME = ebpf::kPeerPodName.SpanKey().to_string();
95-
const std::string DEFAULT_TRACE_TAG_K8S_POD_UID = ebpf::kPodUid.SpanKey().to_string();
96-
const std::string DEFAULT_TRACE_TAG_K8S_POD_IP = ebpf::kPodIp.SpanKey().to_string();
97-
const std::string DEFAULT_TRACE_TAG_K8S_PEER_POD_IP = ebpf::kPeerPodIp.SpanKey().to_string();
98-
const std::string DEFAULT_TRACE_TAG_K8S_WORKLOAD_KIND = ebpf::kWorkloadKind.SpanKey().to_string();
99-
const std::string DEFAULT_TRACE_TAG_K8S_PEER_WORKLOAD_KIND = ebpf::kPeerWorkloadKind.SpanKey().to_string();
100-
const std::string DEFAULT_TRACE_TAG_K8S_WORKLOAD_NAME = ebpf::kWorkloadName.SpanKey().to_string();
101-
const std::string DEFAULT_TRACE_TAG_K8S_PEER_WORKLOAD_NAME = ebpf::kPeerWorkloadName.SpanKey().to_string();
102-
const std::string DEFAULT_TRACE_TAG_K8S_SERVICE_NAME = ebpf::kServiceName.SpanKey().to_string();
103-
const std::string DEFAULT_TRACE_TAG_K8S_PEER_SERVICE_NAME = ebpf::kPeerServiceName.SpanKey().to_string();
104-
const std::string DEFAULT_TRACE_TAG_HOST_NAME = ebpf::kHostName.SpanKey().to_string();
105-
const std::string DEFAULT_TRACE_TAG_HOST_IP = ebpf::kHostIp.SpanKey().to_string();
106-
const std::string DEFAULT_TRACE_TAG_PROCESS_PID = ebpf::kProcessId.SpanKey().to_string();
107-
const std::string DEFAULT_TRACE_TAG_CONTAINER_NAME = ebpf::kContainerName.SpanKey().to_string();
108-
const std::string DEFAULT_TRACE_TAG_CONTAINER_ID = ebpf::kContainerId.SpanKey().to_string();
109-
const std::string DEFAULT_TRACE_TAG_IMAGE_NAME = ebpf::kImageName.SpanKey().to_string();
110-
111-
11282
} // namespace logtail

core/constants/TagConstants.h

-30
Original file line numberDiff line numberDiff line change
@@ -68,34 +68,4 @@ extern const std::string LOG_RESERVED_KEY_TOPIC;
6868
extern const std::string LOG_RESERVED_KEY_MACHINE_UUID;
6969
extern const std::string LOG_RESERVED_KEY_PACKAGE_ID;
7070

71-
////////////////////////// METRIC ////////////////////////
72-
extern const std::string DEFAULT_METRIC_TAG_NAMESPACE;
73-
extern const std::string DEFAULT_METRIC_TAG_POD_NAME;
74-
extern const std::string DEFAULT_METRIC_TAG_POD_UID;
75-
extern const std::string DEFAULT_METRIC_TAG_CONTAINER_NAME;
76-
extern const std::string DEFAULT_METRIC_TAG_CONTAINER_IP;
77-
extern const std::string DEFAULT_METRIC_TAG_IMAGE_NAME;
78-
79-
////////////////////////// TRACE ////////////////////////
80-
extern const std::string DEFAULT_TRACE_TAG_K8S_NAMESPACE;
81-
extern const std::string DEFAULT_TRACE_TAG_K8S_PEER_NAMESPACE;
82-
extern const std::string DEFAULT_TRACE_TAG_K8S_POD_NAME;
83-
extern const std::string DEFAULT_TRACE_TAG_K8S_PEER_POD_NAME;
84-
extern const std::string DEFAULT_TRACE_TAG_K8S_POD_UID;
85-
extern const std::string DEFAULT_TRACE_TAG_K8S_POD_IP;
86-
extern const std::string DEFAULT_TRACE_TAG_K8S_PEER_POD_IP;
87-
extern const std::string DEFAULT_TRACE_TAG_K8S_WORKLOAD_KIND;
88-
extern const std::string DEFAULT_TRACE_TAG_K8S_PEER_WORKLOAD_KIND;
89-
extern const std::string DEFAULT_TRACE_TAG_K8S_WORKLOAD_NAME;
90-
extern const std::string DEFAULT_TRACE_TAG_K8S_PEER_WORKLOAD_NAME;
91-
extern const std::string DEFAULT_TRACE_TAG_K8S_SERVICE_NAME;
92-
extern const std::string DEFAULT_TRACE_TAG_K8S_PEER_SERVICE_NAME;
93-
extern const std::string DEFAULT_TRACE_TAG_HOST_NAME;
94-
extern const std::string DEFAULT_TRACE_TAG_HOST_IP;
95-
extern const std::string DEFAULT_TRACE_TAG_PROCESS_PID;
96-
extern const std::string DEFAULT_TRACE_TAG_CONTAINER_NAME;
97-
extern const std::string DEFAULT_TRACE_TAG_CONTAINER_ID;
98-
extern const std::string DEFAULT_TRACE_TAG_IMAGE_NAME;
99-
100-
10171
} // namespace logtail

core/ebpf/plugin/network_observer/Connection.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ void Connection::UpdateNetMetaAttr(struct conn_stats_event_t* event) {
215215
mTags.Set<kIp>(sip);
216216
mTags.Set<kRemoteIp>(dip);
217217

218+
MarkL4MetaAttached();
219+
218220

219221
// for peer meta
220222
LOG_DEBUG(sLogger, ("try attach peer meta", GetRemoteIp()));
@@ -223,8 +225,6 @@ void Connection::UpdateNetMetaAttr(struct conn_stats_event_t* event) {
223225
// for self meta
224226
LOG_DEBUG(sLogger, ("try attach self meta", GetContainerId()));
225227
TryAttachSelfMeta();
226-
227-
MarkL4MetaAttached();
228228
}
229229

230230
void Connection::UpdateSelfPodMeta(const std::shared_ptr<K8sPodInfo>& pod) {

0 commit comments

Comments
 (0)