Procházet zdrojové kódy

Add result value spanId for GetTrace api.

sdk-team před 5 roky
rodič
revize
4f16d1bd02

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+2021-01-11 Version: patch
+- Add result value spanId for GetTrace api.
+
 2021-01-11 Version: patch
 - Support DescribeScheduleTasks.
 - Support CancelScheduleTasks.

+ 2 - 14
xtrace/CMakeLists.txt

@@ -21,10 +21,6 @@ set(xtrace_public_header
 	include/alibabacloud/xtrace/XtraceExport.h )
 
 set(xtrace_public_header_model 
-	include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h
-	include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h
-	include/alibabacloud/xtrace/model/GetSamplingRequest.h
-	include/alibabacloud/xtrace/model/GetSamplingResult.h
 	include/alibabacloud/xtrace/model/GetTagKeyRequest.h
 	include/alibabacloud/xtrace/model/GetTagKeyResult.h
 	include/alibabacloud/xtrace/model/GetTagValRequest.h
@@ -44,16 +40,10 @@ set(xtrace_public_header_model
 	include/alibabacloud/xtrace/model/QueryMetricRequest.h
 	include/alibabacloud/xtrace/model/QueryMetricResult.h
 	include/alibabacloud/xtrace/model/SearchTracesRequest.h
-	include/alibabacloud/xtrace/model/SearchTracesResult.h
-	include/alibabacloud/xtrace/model/UpdateSamplingRequest.h
-	include/alibabacloud/xtrace/model/UpdateSamplingResult.h )
+	include/alibabacloud/xtrace/model/SearchTracesResult.h )
 
 set(xtrace_src 
 	src/XtraceClient.cc
-	src/model/CheckServiceLinkedRoleForDeletingRequest.cc
-	src/model/CheckServiceLinkedRoleForDeletingResult.cc
-	src/model/GetSamplingRequest.cc
-	src/model/GetSamplingResult.cc
 	src/model/GetTagKeyRequest.cc
 	src/model/GetTagKeyResult.cc
 	src/model/GetTagValRequest.cc
@@ -73,9 +63,7 @@ set(xtrace_src
 	src/model/QueryMetricRequest.cc
 	src/model/QueryMetricResult.cc
 	src/model/SearchTracesRequest.cc
-	src/model/SearchTracesResult.cc
-	src/model/UpdateSamplingRequest.cc
-	src/model/UpdateSamplingResult.cc )
+	src/model/SearchTracesResult.cc )
 
 add_library(xtrace ${LIB_TYPE}
 	${xtrace_public_header}

+ 0 - 24
xtrace/include/alibabacloud/xtrace/XtraceClient.h

@@ -22,10 +22,6 @@
 #include <alibabacloud/core/EndpointProvider.h>
 #include <alibabacloud/core/RpcServiceClient.h>
 #include "XtraceExport.h"
-#include "model/CheckServiceLinkedRoleForDeletingRequest.h"
-#include "model/CheckServiceLinkedRoleForDeletingResult.h"
-#include "model/GetSamplingRequest.h"
-#include "model/GetSamplingResult.h"
 #include "model/GetTagKeyRequest.h"
 #include "model/GetTagKeyResult.h"
 #include "model/GetTagValRequest.h"
@@ -46,8 +42,6 @@
 #include "model/QueryMetricResult.h"
 #include "model/SearchTracesRequest.h"
 #include "model/SearchTracesResult.h"
-#include "model/UpdateSamplingRequest.h"
-#include "model/UpdateSamplingResult.h"
 
 
 namespace AlibabaCloud
@@ -57,12 +51,6 @@ namespace AlibabaCloud
 		class ALIBABACLOUD_XTRACE_EXPORT XtraceClient : public RpcServiceClient
 		{
 		public:
-			typedef Outcome<Error, Model::CheckServiceLinkedRoleForDeletingResult> CheckServiceLinkedRoleForDeletingOutcome;
-			typedef std::future<CheckServiceLinkedRoleForDeletingOutcome> CheckServiceLinkedRoleForDeletingOutcomeCallable;
-			typedef std::function<void(const XtraceClient*, const Model::CheckServiceLinkedRoleForDeletingRequest&, const CheckServiceLinkedRoleForDeletingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckServiceLinkedRoleForDeletingAsyncHandler;
-			typedef Outcome<Error, Model::GetSamplingResult> GetSamplingOutcome;
-			typedef std::future<GetSamplingOutcome> GetSamplingOutcomeCallable;
-			typedef std::function<void(const XtraceClient*, const Model::GetSamplingRequest&, const GetSamplingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSamplingAsyncHandler;
 			typedef Outcome<Error, Model::GetTagKeyResult> GetTagKeyOutcome;
 			typedef std::future<GetTagKeyOutcome> GetTagKeyOutcomeCallable;
 			typedef std::function<void(const XtraceClient*, const Model::GetTagKeyRequest&, const GetTagKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetTagKeyAsyncHandler;
@@ -93,20 +81,11 @@ namespace AlibabaCloud
 			typedef Outcome<Error, Model::SearchTracesResult> SearchTracesOutcome;
 			typedef std::future<SearchTracesOutcome> SearchTracesOutcomeCallable;
 			typedef std::function<void(const XtraceClient*, const Model::SearchTracesRequest&, const SearchTracesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchTracesAsyncHandler;
-			typedef Outcome<Error, Model::UpdateSamplingResult> UpdateSamplingOutcome;
-			typedef std::future<UpdateSamplingOutcome> UpdateSamplingOutcomeCallable;
-			typedef std::function<void(const XtraceClient*, const Model::UpdateSamplingRequest&, const UpdateSamplingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateSamplingAsyncHandler;
 
 			XtraceClient(const Credentials &credentials, const ClientConfiguration &configuration);
 			XtraceClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
 			XtraceClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
 			~XtraceClient();
-			CheckServiceLinkedRoleForDeletingOutcome checkServiceLinkedRoleForDeleting(const Model::CheckServiceLinkedRoleForDeletingRequest &request)const;
-			void checkServiceLinkedRoleForDeletingAsync(const Model::CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
-			CheckServiceLinkedRoleForDeletingOutcomeCallable checkServiceLinkedRoleForDeletingCallable(const Model::CheckServiceLinkedRoleForDeletingRequest& request) const;
-			GetSamplingOutcome getSampling(const Model::GetSamplingRequest &request)const;
-			void getSamplingAsync(const Model::GetSamplingRequest& request, const GetSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
-			GetSamplingOutcomeCallable getSamplingCallable(const Model::GetSamplingRequest& request) const;
 			GetTagKeyOutcome getTagKey(const Model::GetTagKeyRequest &request)const;
 			void getTagKeyAsync(const Model::GetTagKeyRequest& request, const GetTagKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			GetTagKeyOutcomeCallable getTagKeyCallable(const Model::GetTagKeyRequest& request) const;
@@ -137,9 +116,6 @@ namespace AlibabaCloud
 			SearchTracesOutcome searchTraces(const Model::SearchTracesRequest &request)const;
 			void searchTracesAsync(const Model::SearchTracesRequest& request, const SearchTracesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
 			SearchTracesOutcomeCallable searchTracesCallable(const Model::SearchTracesRequest& request) const;
-			UpdateSamplingOutcome updateSampling(const Model::UpdateSamplingRequest &request)const;
-			void updateSamplingAsync(const Model::UpdateSamplingRequest& request, const UpdateSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
-			UpdateSamplingOutcomeCallable updateSamplingCallable(const Model::UpdateSamplingRequest& request) const;
 	
 		private:
 			std::shared_ptr<EndpointProvider> endpointProvider_;

+ 0 - 60
xtrace/include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h

@@ -1,60 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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.
- */
-
-#ifndef ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
-#define ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/xtrace/XtraceExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Xtrace
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_XTRACE_EXPORT CheckServiceLinkedRoleForDeletingRequest : public RpcServiceRequest
-			{
-
-			public:
-				CheckServiceLinkedRoleForDeletingRequest();
-				~CheckServiceLinkedRoleForDeletingRequest();
-
-				std::string getSPIRegionId()const;
-				void setSPIRegionId(const std::string& sPIRegionId);
-				std::string getRegionId()const;
-				void setRegionId(const std::string& regionId);
-				std::string getRoleArn()const;
-				void setRoleArn(const std::string& roleArn);
-				std::string getDeletionTaskId()const;
-				void setDeletionTaskId(const std::string& deletionTaskId);
-				std::string getServiceName()const;
-				void setServiceName(const std::string& serviceName);
-
-            private:
-				std::string sPIRegionId_;
-				std::string regionId_;
-				std::string roleArn_;
-				std::string deletionTaskId_;
-				std::string serviceName_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGREQUEST_H_

+ 0 - 58
xtrace/include/alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h

@@ -1,58 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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.
- */
-
-#ifndef ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
-#define ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_
-
-#include <string>
-#include <vector>
-#include <utility>
-#include <alibabacloud/core/ServiceResult.h>
-#include <alibabacloud/xtrace/XtraceExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Xtrace
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_XTRACE_EXPORT CheckServiceLinkedRoleForDeletingResult : public ServiceResult
-			{
-			public:
-				struct RoleUsagesItem
-				{
-					std::string region;
-					std::vector<std::string> resources;
-				};
-
-
-				CheckServiceLinkedRoleForDeletingResult();
-				explicit CheckServiceLinkedRoleForDeletingResult(const std::string &payload);
-				~CheckServiceLinkedRoleForDeletingResult();
-				bool getDeletable()const;
-				std::vector<RoleUsagesItem> getRoleUsages()const;
-
-			protected:
-				void parse(const std::string &payload);
-			private:
-				bool deletable_;
-				std::vector<RoleUsagesItem> roleUsages_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_XTRACE_MODEL_CHECKSERVICELINKEDROLEFORDELETINGRESULT_H_

+ 0 - 51
xtrace/include/alibabacloud/xtrace/model/GetSamplingRequest.h

@@ -1,51 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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.
- */
-
-#ifndef ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGREQUEST_H_
-#define ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/xtrace/XtraceExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Xtrace
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_XTRACE_EXPORT GetSamplingRequest : public RpcServiceRequest
-			{
-
-			public:
-				GetSamplingRequest();
-				~GetSamplingRequest();
-
-				std::string getRegionId()const;
-				void setRegionId(const std::string& regionId);
-				std::string getProxyUserId()const;
-				void setProxyUserId(const std::string& proxyUserId);
-
-            private:
-				std::string regionId_;
-				std::string proxyUserId_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGREQUEST_H_

+ 0 - 51
xtrace/include/alibabacloud/xtrace/model/GetSamplingResult.h

@@ -1,51 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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.
- */
-
-#ifndef ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGRESULT_H_
-#define ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGRESULT_H_
-
-#include <string>
-#include <vector>
-#include <utility>
-#include <alibabacloud/core/ServiceResult.h>
-#include <alibabacloud/xtrace/XtraceExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Xtrace
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_XTRACE_EXPORT GetSamplingResult : public ServiceResult
-			{
-			public:
-
-
-				GetSamplingResult();
-				explicit GetSamplingResult(const std::string &payload);
-				~GetSamplingResult();
-				std::string getData()const;
-
-			protected:
-				void parse(const std::string &payload);
-			private:
-				std::string data_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_XTRACE_MODEL_GETSAMPLINGRESULT_H_

+ 3 - 0
xtrace/include/alibabacloud/xtrace/model/GetTokenRequest.h

@@ -41,11 +41,14 @@ namespace AlibabaCloud
 				void setAppType(const std::string& appType);
 				std::string getProxyUserId()const;
 				void setProxyUserId(const std::string& proxyUserId);
+				bool getIsForce()const;
+				void setIsForce(bool isForce);
 
             private:
 				std::string regionId_;
 				std::string appType_;
 				std::string proxyUserId_;
+				bool isForce_;
 
 			};
 		}

+ 7 - 5
xtrace/include/alibabacloud/xtrace/model/GetTraceResult.h

@@ -49,17 +49,19 @@ namespace AlibabaCloud
 						std::vector<LogEvent::TagEntry2> tagEntryList1;
 						long timestamp;
 					};
-					bool haveStack;
+					std::string parentSpanId;
 					std::string serviceIp;
-					std::vector<Span::LogEvent> logEventList;
 					std::string operationName;
-					std::string serviceName;
-					std::string rpcId;
-					std::string traceID;
 					long duration;
 					std::vector<Span::TagEntry> tagEntryList;
 					long timestamp;
+					bool haveStack;
+					std::vector<Span::LogEvent> logEventList;
+					std::string serviceName;
+					std::string rpcId;
+					std::string traceID;
 					std::string resultCode;
+					std::string spanId;
 				};
 
 

+ 0 - 54
xtrace/include/alibabacloud/xtrace/model/UpdateSamplingRequest.h

@@ -1,54 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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.
- */
-
-#ifndef ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGREQUEST_H_
-#define ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGREQUEST_H_
-
-#include <string>
-#include <vector>
-#include <alibabacloud/core/RpcServiceRequest.h>
-#include <alibabacloud/xtrace/XtraceExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Xtrace
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_XTRACE_EXPORT UpdateSamplingRequest : public RpcServiceRequest
-			{
-
-			public:
-				UpdateSamplingRequest();
-				~UpdateSamplingRequest();
-
-				std::string getRegionId()const;
-				void setRegionId(const std::string& regionId);
-				std::string getSampling()const;
-				void setSampling(const std::string& sampling);
-				std::string getProxyUserId()const;
-				void setProxyUserId(const std::string& proxyUserId);
-
-            private:
-				std::string regionId_;
-				std::string sampling_;
-				std::string proxyUserId_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGREQUEST_H_

+ 0 - 51
xtrace/include/alibabacloud/xtrace/model/UpdateSamplingResult.h

@@ -1,51 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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.
- */
-
-#ifndef ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGRESULT_H_
-#define ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGRESULT_H_
-
-#include <string>
-#include <vector>
-#include <utility>
-#include <alibabacloud/core/ServiceResult.h>
-#include <alibabacloud/xtrace/XtraceExport.h>
-
-namespace AlibabaCloud
-{
-	namespace Xtrace
-	{
-		namespace Model
-		{
-			class ALIBABACLOUD_XTRACE_EXPORT UpdateSamplingResult : public ServiceResult
-			{
-			public:
-
-
-				UpdateSamplingResult();
-				explicit UpdateSamplingResult(const std::string &payload);
-				~UpdateSamplingResult();
-				std::string getData()const;
-
-			protected:
-				void parse(const std::string &payload);
-			private:
-				std::string data_;
-
-			};
-		}
-	}
-}
-#endif // !ALIBABACLOUD_XTRACE_MODEL_UPDATESAMPLINGRESULT_H_

+ 0 - 108
xtrace/src/XtraceClient.cc

@@ -51,78 +51,6 @@ XtraceClient::XtraceClient(const std::string & accessKeyId, const std::string &
 XtraceClient::~XtraceClient()
 {}
 
-XtraceClient::CheckServiceLinkedRoleForDeletingOutcome XtraceClient::checkServiceLinkedRoleForDeleting(const CheckServiceLinkedRoleForDeletingRequest &request) const
-{
-	auto endpointOutcome = endpointProvider_->getEndpoint();
-	if (!endpointOutcome.isSuccess())
-		return CheckServiceLinkedRoleForDeletingOutcome(endpointOutcome.error());
-
-	auto outcome = makeRequest(endpointOutcome.result(), request);
-
-	if (outcome.isSuccess())
-		return CheckServiceLinkedRoleForDeletingOutcome(CheckServiceLinkedRoleForDeletingResult(outcome.result()));
-	else
-		return CheckServiceLinkedRoleForDeletingOutcome(outcome.error());
-}
-
-void XtraceClient::checkServiceLinkedRoleForDeletingAsync(const CheckServiceLinkedRoleForDeletingRequest& request, const CheckServiceLinkedRoleForDeletingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
-{
-	auto fn = [this, request, handler, context]()
-	{
-		handler(this, request, checkServiceLinkedRoleForDeleting(request), context);
-	};
-
-	asyncExecute(new Runnable(fn));
-}
-
-XtraceClient::CheckServiceLinkedRoleForDeletingOutcomeCallable XtraceClient::checkServiceLinkedRoleForDeletingCallable(const CheckServiceLinkedRoleForDeletingRequest &request) const
-{
-	auto task = std::make_shared<std::packaged_task<CheckServiceLinkedRoleForDeletingOutcome()>>(
-			[this, request]()
-			{
-			return this->checkServiceLinkedRoleForDeleting(request);
-			});
-
-	asyncExecute(new Runnable([task]() { (*task)(); }));
-	return task->get_future();
-}
-
-XtraceClient::GetSamplingOutcome XtraceClient::getSampling(const GetSamplingRequest &request) const
-{
-	auto endpointOutcome = endpointProvider_->getEndpoint();
-	if (!endpointOutcome.isSuccess())
-		return GetSamplingOutcome(endpointOutcome.error());
-
-	auto outcome = makeRequest(endpointOutcome.result(), request);
-
-	if (outcome.isSuccess())
-		return GetSamplingOutcome(GetSamplingResult(outcome.result()));
-	else
-		return GetSamplingOutcome(outcome.error());
-}
-
-void XtraceClient::getSamplingAsync(const GetSamplingRequest& request, const GetSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
-{
-	auto fn = [this, request, handler, context]()
-	{
-		handler(this, request, getSampling(request), context);
-	};
-
-	asyncExecute(new Runnable(fn));
-}
-
-XtraceClient::GetSamplingOutcomeCallable XtraceClient::getSamplingCallable(const GetSamplingRequest &request) const
-{
-	auto task = std::make_shared<std::packaged_task<GetSamplingOutcome()>>(
-			[this, request]()
-			{
-			return this->getSampling(request);
-			});
-
-	asyncExecute(new Runnable([task]() { (*task)(); }));
-	return task->get_future();
-}
-
 XtraceClient::GetTagKeyOutcome XtraceClient::getTagKey(const GetTagKeyRequest &request) const
 {
 	auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -483,39 +411,3 @@ XtraceClient::SearchTracesOutcomeCallable XtraceClient::searchTracesCallable(con
 	return task->get_future();
 }
 
-XtraceClient::UpdateSamplingOutcome XtraceClient::updateSampling(const UpdateSamplingRequest &request) const
-{
-	auto endpointOutcome = endpointProvider_->getEndpoint();
-	if (!endpointOutcome.isSuccess())
-		return UpdateSamplingOutcome(endpointOutcome.error());
-
-	auto outcome = makeRequest(endpointOutcome.result(), request);
-
-	if (outcome.isSuccess())
-		return UpdateSamplingOutcome(UpdateSamplingResult(outcome.result()));
-	else
-		return UpdateSamplingOutcome(outcome.error());
-}
-
-void XtraceClient::updateSamplingAsync(const UpdateSamplingRequest& request, const UpdateSamplingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
-{
-	auto fn = [this, request, handler, context]()
-	{
-		handler(this, request, updateSampling(request), context);
-	};
-
-	asyncExecute(new Runnable(fn));
-}
-
-XtraceClient::UpdateSamplingOutcomeCallable XtraceClient::updateSamplingCallable(const UpdateSamplingRequest &request) const
-{
-	auto task = std::make_shared<std::packaged_task<UpdateSamplingOutcome()>>(
-			[this, request]()
-			{
-			return this->updateSampling(request);
-			});
-
-	asyncExecute(new Runnable([task]() { (*task)(); }));
-	return task->get_future();
-}
-

+ 0 - 84
xtrace/src/model/CheckServiceLinkedRoleForDeletingRequest.cc

@@ -1,84 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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 <alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingRequest.h>
-
-using AlibabaCloud::Xtrace::Model::CheckServiceLinkedRoleForDeletingRequest;
-
-CheckServiceLinkedRoleForDeletingRequest::CheckServiceLinkedRoleForDeletingRequest() :
-	RpcServiceRequest("xtrace", "2019-08-08", "CheckServiceLinkedRoleForDeleting")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-CheckServiceLinkedRoleForDeletingRequest::~CheckServiceLinkedRoleForDeletingRequest()
-{}
-
-std::string CheckServiceLinkedRoleForDeletingRequest::getSPIRegionId()const
-{
-	return sPIRegionId_;
-}
-
-void CheckServiceLinkedRoleForDeletingRequest::setSPIRegionId(const std::string& sPIRegionId)
-{
-	sPIRegionId_ = sPIRegionId;
-	setParameter("SPIRegionId", sPIRegionId);
-}
-
-std::string CheckServiceLinkedRoleForDeletingRequest::getRegionId()const
-{
-	return regionId_;
-}
-
-void CheckServiceLinkedRoleForDeletingRequest::setRegionId(const std::string& regionId)
-{
-	regionId_ = regionId;
-	setParameter("RegionId", regionId);
-}
-
-std::string CheckServiceLinkedRoleForDeletingRequest::getRoleArn()const
-{
-	return roleArn_;
-}
-
-void CheckServiceLinkedRoleForDeletingRequest::setRoleArn(const std::string& roleArn)
-{
-	roleArn_ = roleArn;
-	setParameter("RoleArn", roleArn);
-}
-
-std::string CheckServiceLinkedRoleForDeletingRequest::getDeletionTaskId()const
-{
-	return deletionTaskId_;
-}
-
-void CheckServiceLinkedRoleForDeletingRequest::setDeletionTaskId(const std::string& deletionTaskId)
-{
-	deletionTaskId_ = deletionTaskId;
-	setParameter("DeletionTaskId", deletionTaskId);
-}
-
-std::string CheckServiceLinkedRoleForDeletingRequest::getServiceName()const
-{
-	return serviceName_;
-}
-
-void CheckServiceLinkedRoleForDeletingRequest::setServiceName(const std::string& serviceName)
-{
-	serviceName_ = serviceName;
-	setParameter("ServiceName", serviceName);
-}
-

+ 0 - 67
xtrace/src/model/CheckServiceLinkedRoleForDeletingResult.cc

@@ -1,67 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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 <alibabacloud/xtrace/model/CheckServiceLinkedRoleForDeletingResult.h>
-#include <json/json.h>
-
-using namespace AlibabaCloud::Xtrace;
-using namespace AlibabaCloud::Xtrace::Model;
-
-CheckServiceLinkedRoleForDeletingResult::CheckServiceLinkedRoleForDeletingResult() :
-	ServiceResult()
-{}
-
-CheckServiceLinkedRoleForDeletingResult::CheckServiceLinkedRoleForDeletingResult(const std::string &payload) :
-	ServiceResult()
-{
-	parse(payload);
-}
-
-CheckServiceLinkedRoleForDeletingResult::~CheckServiceLinkedRoleForDeletingResult()
-{}
-
-void CheckServiceLinkedRoleForDeletingResult::parse(const std::string &payload)
-{
-	Json::Reader reader;
-	Json::Value value;
-	reader.parse(payload, value);
-	setRequestId(value["RequestId"].asString());
-	auto allRoleUsagesNode = value["RoleUsages"]["RoleUsagesItem"];
-	for (auto valueRoleUsagesRoleUsagesItem : allRoleUsagesNode)
-	{
-		RoleUsagesItem roleUsagesObject;
-		if(!valueRoleUsagesRoleUsagesItem["Region"].isNull())
-			roleUsagesObject.region = valueRoleUsagesRoleUsagesItem["Region"].asString();
-		auto allResources = value["Resources"]["Resources"];
-		for (auto value : allResources)
-			roleUsagesObject.resources.push_back(value.asString());
-		roleUsages_.push_back(roleUsagesObject);
-	}
-	if(!value["Deletable"].isNull())
-		deletable_ = value["Deletable"].asString() == "true";
-
-}
-
-bool CheckServiceLinkedRoleForDeletingResult::getDeletable()const
-{
-	return deletable_;
-}
-
-std::vector<CheckServiceLinkedRoleForDeletingResult::RoleUsagesItem> CheckServiceLinkedRoleForDeletingResult::getRoleUsages()const
-{
-	return roleUsages_;
-}
-

+ 0 - 51
xtrace/src/model/GetSamplingRequest.cc

@@ -1,51 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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 <alibabacloud/xtrace/model/GetSamplingRequest.h>
-
-using AlibabaCloud::Xtrace::Model::GetSamplingRequest;
-
-GetSamplingRequest::GetSamplingRequest() :
-	RpcServiceRequest("xtrace", "2019-08-08", "GetSampling")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-GetSamplingRequest::~GetSamplingRequest()
-{}
-
-std::string GetSamplingRequest::getRegionId()const
-{
-	return regionId_;
-}
-
-void GetSamplingRequest::setRegionId(const std::string& regionId)
-{
-	regionId_ = regionId;
-	setParameter("RegionId", regionId);
-}
-
-std::string GetSamplingRequest::getProxyUserId()const
-{
-	return proxyUserId_;
-}
-
-void GetSamplingRequest::setProxyUserId(const std::string& proxyUserId)
-{
-	proxyUserId_ = proxyUserId;
-	setParameter("ProxyUserId", proxyUserId);
-}
-

+ 0 - 51
xtrace/src/model/GetSamplingResult.cc

@@ -1,51 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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 <alibabacloud/xtrace/model/GetSamplingResult.h>
-#include <json/json.h>
-
-using namespace AlibabaCloud::Xtrace;
-using namespace AlibabaCloud::Xtrace::Model;
-
-GetSamplingResult::GetSamplingResult() :
-	ServiceResult()
-{}
-
-GetSamplingResult::GetSamplingResult(const std::string &payload) :
-	ServiceResult()
-{
-	parse(payload);
-}
-
-GetSamplingResult::~GetSamplingResult()
-{}
-
-void GetSamplingResult::parse(const std::string &payload)
-{
-	Json::Reader reader;
-	Json::Value value;
-	reader.parse(payload, value);
-	setRequestId(value["RequestId"].asString());
-	if(!value["Data"].isNull())
-		data_ = value["Data"].asString();
-
-}
-
-std::string GetSamplingResult::getData()const
-{
-	return data_;
-}
-

+ 11 - 0
xtrace/src/model/GetTokenRequest.cc

@@ -60,3 +60,14 @@ void GetTokenRequest::setProxyUserId(const std::string& proxyUserId)
 	setParameter("ProxyUserId", proxyUserId);
 }
 
+bool GetTokenRequest::getIsForce()const
+{
+	return isForce_;
+}
+
+void GetTokenRequest::setIsForce(bool isForce)
+{
+	isForce_ = isForce;
+	setParameter("IsForce", isForce ? "true" : "false");
+}
+

+ 20 - 16
xtrace/src/model/GetTraceResult.cc

@@ -61,30 +61,34 @@ void GetTraceResult::parse(const std::string &payload)
 			spansObject.resultCode = valueSpansSpan["ResultCode"].asString();
 		if(!valueSpansSpan["HaveStack"].isNull())
 			spansObject.haveStack = valueSpansSpan["HaveStack"].asString() == "true";
-		auto allTagEntryListNode = allSpansNode["TagEntryList"]["TagEntry"];
-		for (auto allSpansNodeTagEntryListTagEntry : allTagEntryListNode)
+		if(!valueSpansSpan["SpanId"].isNull())
+			spansObject.spanId = valueSpansSpan["SpanId"].asString();
+		if(!valueSpansSpan["ParentSpanId"].isNull())
+			spansObject.parentSpanId = valueSpansSpan["ParentSpanId"].asString();
+		auto allTagEntryListNode = valueSpansSpan["TagEntryList"]["TagEntry"];
+		for (auto valueSpansSpanTagEntryListTagEntry : allTagEntryListNode)
 		{
 			Span::TagEntry tagEntryListObject;
-			if(!allSpansNodeTagEntryListTagEntry["Key"].isNull())
-				tagEntryListObject.key = allSpansNodeTagEntryListTagEntry["Key"].asString();
-			if(!allSpansNodeTagEntryListTagEntry["Value"].isNull())
-				tagEntryListObject.value = allSpansNodeTagEntryListTagEntry["Value"].asString();
+			if(!valueSpansSpanTagEntryListTagEntry["Key"].isNull())
+				tagEntryListObject.key = valueSpansSpanTagEntryListTagEntry["Key"].asString();
+			if(!valueSpansSpanTagEntryListTagEntry["Value"].isNull())
+				tagEntryListObject.value = valueSpansSpanTagEntryListTagEntry["Value"].asString();
 			spansObject.tagEntryList.push_back(tagEntryListObject);
 		}
-		auto allLogEventListNode = allSpansNode["LogEventList"]["LogEvent"];
-		for (auto allSpansNodeLogEventListLogEvent : allLogEventListNode)
+		auto allLogEventListNode = valueSpansSpan["LogEventList"]["LogEvent"];
+		for (auto valueSpansSpanLogEventListLogEvent : allLogEventListNode)
 		{
 			Span::LogEvent logEventListObject;
-			if(!allSpansNodeLogEventListLogEvent["Timestamp"].isNull())
-				logEventListObject.timestamp = std::stol(allSpansNodeLogEventListLogEvent["Timestamp"].asString());
-			auto allTagEntryList1Node = allLogEventListNode["TagEntryList"]["TagEntry"];
-			for (auto allLogEventListNodeTagEntryListTagEntry : allTagEntryList1Node)
+			if(!valueSpansSpanLogEventListLogEvent["Timestamp"].isNull())
+				logEventListObject.timestamp = std::stol(valueSpansSpanLogEventListLogEvent["Timestamp"].asString());
+			auto allTagEntryList1Node = valueSpansSpanLogEventListLogEvent["TagEntryList"]["TagEntry"];
+			for (auto valueSpansSpanLogEventListLogEventTagEntryListTagEntry : allTagEntryList1Node)
 			{
 				Span::LogEvent::TagEntry2 tagEntryList1Object;
-				if(!allLogEventListNodeTagEntryListTagEntry["Key"].isNull())
-					tagEntryList1Object.key = allLogEventListNodeTagEntryListTagEntry["Key"].asString();
-				if(!allLogEventListNodeTagEntryListTagEntry["Value"].isNull())
-					tagEntryList1Object.value = allLogEventListNodeTagEntryListTagEntry["Value"].asString();
+				if(!valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Key"].isNull())
+					tagEntryList1Object.key = valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Key"].asString();
+				if(!valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Value"].isNull())
+					tagEntryList1Object.value = valueSpansSpanLogEventListLogEventTagEntryListTagEntry["Value"].asString();
 				logEventListObject.tagEntryList1.push_back(tagEntryList1Object);
 			}
 			spansObject.logEventList.push_back(logEventListObject);

+ 0 - 62
xtrace/src/model/UpdateSamplingRequest.cc

@@ -1,62 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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 <alibabacloud/xtrace/model/UpdateSamplingRequest.h>
-
-using AlibabaCloud::Xtrace::Model::UpdateSamplingRequest;
-
-UpdateSamplingRequest::UpdateSamplingRequest() :
-	RpcServiceRequest("xtrace", "2019-08-08", "UpdateSampling")
-{
-	setMethod(HttpRequest::Method::Post);
-}
-
-UpdateSamplingRequest::~UpdateSamplingRequest()
-{}
-
-std::string UpdateSamplingRequest::getRegionId()const
-{
-	return regionId_;
-}
-
-void UpdateSamplingRequest::setRegionId(const std::string& regionId)
-{
-	regionId_ = regionId;
-	setParameter("RegionId", regionId);
-}
-
-std::string UpdateSamplingRequest::getSampling()const
-{
-	return sampling_;
-}
-
-void UpdateSamplingRequest::setSampling(const std::string& sampling)
-{
-	sampling_ = sampling;
-	setParameter("Sampling", sampling);
-}
-
-std::string UpdateSamplingRequest::getProxyUserId()const
-{
-	return proxyUserId_;
-}
-
-void UpdateSamplingRequest::setProxyUserId(const std::string& proxyUserId)
-{
-	proxyUserId_ = proxyUserId;
-	setParameter("ProxyUserId", proxyUserId);
-}
-

+ 0 - 51
xtrace/src/model/UpdateSamplingResult.cc

@@ -1,51 +0,0 @@
-/*
- * Copyright 2009-2017 Alibaba Cloud All rights reserved.
- * 
- * 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 <alibabacloud/xtrace/model/UpdateSamplingResult.h>
-#include <json/json.h>
-
-using namespace AlibabaCloud::Xtrace;
-using namespace AlibabaCloud::Xtrace::Model;
-
-UpdateSamplingResult::UpdateSamplingResult() :
-	ServiceResult()
-{}
-
-UpdateSamplingResult::UpdateSamplingResult(const std::string &payload) :
-	ServiceResult()
-{
-	parse(payload);
-}
-
-UpdateSamplingResult::~UpdateSamplingResult()
-{}
-
-void UpdateSamplingResult::parse(const std::string &payload)
-{
-	Json::Reader reader;
-	Json::Value value;
-	reader.parse(payload, value);
-	setRequestId(value["RequestId"].asString());
-	if(!value["Data"].isNull())
-		data_ = value["Data"].asString();
-
-}
-
-std::string UpdateSamplingResult::getData()const
-{
-	return data_;
-}
-