নির্দিষ্ট নেটওয়ার্ক অনুরোধের জন্য কাস্টম মনিটরিং যোগ করুন (অ্যাপল এবং অ্যান্ড্রয়েড অ্যাপস)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
Performance Monitoring আপনাকে আপনার অ্যাপের কর্মক্ষমতা নিরীক্ষণ করতে সাহায্য করার জন্য ট্রেস সংগ্রহ করে। একটি ট্রেস হল আপনার অ্যাপে সময়ের মধ্যে দুটি পয়েন্টের মধ্যে ক্যাপচার করা কর্মক্ষমতা ডেটার একটি প্রতিবেদন।
Performance Monitoring দ্বারা স্বয়ংক্রিয়ভাবে সংগ্রহ করা নেটওয়ার্ক অনুরোধের ট্রেসগুলির মধ্যে আপনার অ্যাপের জন্য বেশিরভাগ নেটওয়ার্ক অনুরোধ অন্তর্ভুক্ত থাকে। যাইহোক, কিছু অনুরোধ রিপোর্ট করা নাও হতে পারে বা আপনি নেটওয়ার্ক অনুরোধ করতে একটি ভিন্ন লাইব্রেরি ব্যবহার করতে পারেন। এই ক্ষেত্রে, আপনি কাস্টম নেটওয়ার্ক অনুরোধ ট্রেসগুলিকে ম্যানুয়ালি ইনস্ট্রুমেন্ট করতে Performance Monitoring API ব্যবহার করতে পারেন৷ কাস্টম নেটওয়ার্ক অনুরোধ ট্রেস শুধুমাত্র Apple এবং Android অ্যাপের জন্য সমর্থিত।
একটি কাস্টম নেটওয়ার্ক অনুরোধ ট্রেসের জন্য ডিফল্ট মেট্রিকগুলি Performance Monitoring দ্বারা স্বয়ংক্রিয়ভাবে সংগ্রহ করা নেটওয়ার্ক অনুরোধের ট্রেসের মতোই, বিশেষ করে প্রতিক্রিয়ার সময়, প্রতিক্রিয়া এবং অনুরোধের পেলোডের আকার এবং সাফল্যের হার। কাস্টম নেটওয়ার্ক অনুরোধ ট্রেস কাস্টম মেট্রিক্স যোগ করা সমর্থন করে না।
আপনার কোডে, আপনি Performance Monitoring SDK দ্বারা প্রদত্ত API ব্যবহার করে একটি কাস্টম নেটওয়ার্ক অনুরোধ ট্রেসের শুরু এবং শেষ সংজ্ঞায়িত করেন।
কাস্টম নেটওয়ার্ক অনুরোধের চিহ্নগুলি Firebase কনসোলে নেটওয়ার্ক অনুরোধগুলির পাশাপাশি প্রদর্শিত হয় যা Performance Monitoring স্বয়ংক্রিয়ভাবে ক্যাপচার করে (ট্রেস টেবিলের নেটওয়ার্ক অনুরোধ সাবট্যাবে)।
কাস্টম নেটওয়ার্ক অনুরোধ ট্রেস যোগ করুন
Performance Monitoring HTTPMetric API ( Swift | Obj-C ) ব্যবহার করুন নির্দিষ্ট নেটওয়ার্ক অনুরোধগুলি নিরীক্ষণ করতে কাস্টম নেটওয়ার্ক অনুরোধের ট্রেস যোগ করতে।
Performance Monitoring এ ম্যানুয়ালি কাস্টম নেটওয়ার্ক অনুরোধের জন্য, নিম্নলিখিত অনুরূপ কোড যোগ করুন:
সুইফট
দ্রষ্টব্য: এই ফায়ারবেস পণ্যটি macOS, Mac ক্যাটালিস্ট, watchOS লক্ষ্যে উপলব্ধ নয়।
কাস্টম নেটওয়ার্ক রিকোয়েস্ট ট্রেসও কাস্টম অ্যাট্রিবিউট ( Swift | Obj-C ) যোগ করা সমর্থন করে কিন্তু কাস্টম মেট্রিক্স নয়।
পরবর্তী পদক্ষেপ
নেটওয়ার্ক অনুরোধের জন্য সতর্কতা সেট আপ করুন যেগুলি আপনার অ্যাপের কর্মক্ষমতা নষ্ট করছে। উদাহরণস্বরূপ, আপনি আপনার দলের জন্য একটি ইমেল সতর্কতা কনফিগার করতে পারেন যদি একটি নির্দিষ্ট URL প্যাটার্নের প্রতিক্রিয়া সময় আপনার সেট করা থ্রেশহোল্ড অতিক্রম করে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-09-04 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["\u003cbr /\u003e\n\niOS+ Android Flutter \n\n\u003cbr /\u003e\n\nPerformance Monitoring collects *traces* to help you monitor the performance of your app. A\ntrace is a report of performance data captured between two points in time in\nyour app.\n\nThe\n[network request traces automatically collected by Performance Monitoring](/docs/perf-mon/network-traces)\ninclude most network requests for your app. However, some requests might not be\nreported or you might use a different library to make network requests. In these\ncases, you can use the Performance Monitoring API to manually instrument\n***custom network request traces***. Custom network request traces are only\nsupported for Apple and Android apps.\n\nThe default metrics for a custom network request trace are the same as those for\nthe network request traces automatically collected by Performance Monitoring, specifically\nresponse time, response and request payload size, and success rate. Custom\nnetwork request traces do not support adding custom metrics.\n\nIn your code, you define the beginning and the end of a custom network request\ntrace using the APIs provided by the Performance Monitoring SDK.\n\nCustom network request traces appear in the Firebase console alongside the\nnetwork requests that Performance Monitoring captures automatically\n(in the *Network requests* subtab of the traces table).\n\nAdd custom network request traces\n\nUse the Performance Monitoring HTTPMetric API\n([Swift](/docs/reference/swift/firebaseperformance/api/reference/Classes/HTTPMetric)\n\\|\n[Obj-C](/docs/reference/ios/firebaseperformance/api/reference/Classes/FIRHTTPMetric))\nto add custom network request traces to monitor specific network requests.\n\nTo manually instrument custom network requests in Performance Monitoring, add code similar\nto the following: \n\nSwift\n\n\n**Note:** This Firebase product is not available on macOS, Mac Catalyst, watchOS targets. \n\n guard let metric = HTTPMetric(url: \"https://www.google.com\", httpMethod: .get) else { return }\n\n metric.start()\n guard let url = URL(string: \"https://www.google.com\") else { return }\n let request: URLRequest = URLRequest(url:url)\n let session = URLSession(configuration: .default)\n let dataTask = session.dataTask(with: request) { (urlData, response, error) in\n if let httpResponse = response as? HTTPURLResponse {\n metric.responseCode = httpResponse.statusCode\n }\n metric.stop()\n }\n dataTask.resume()\n\nObjective-C\n\n\n**Note:** This Firebase product is not available on macOS, Mac Catalyst, watchOS targets. \n\n @property (nonatomic) FIRHTTPMetric *metric;\n\n - (void)beginManualNetworkInstrumentation {\n self.metric =\n [[FIRHttpMetric alloc] initWithURL:[NSURL URLWithString:@\"https://www.google.com\"]\n HTTPMethod:FIRHTTPMethodGET];\n\n [self.metric start];\n\n NSURLRequest *request =\n [NSURLRequest requestWithURL:[NSURL URLWithString:@\"https://www.google.com\"]];\n NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request\n delegate:self];\n [connection resume];\n }\n\n - (void)connection:(NSURLConnection *)connection\n didReceiveResponse:(NSURLResponse *) response {\n NSHTTPURLResponse* httpResponse = (NSHTTPURLResponse*)response\n self.metric.responseCode = httpResponse.statusCode;\n [self.metric stop];\n }\n\nCustom network request traces also support adding custom attributes\n([Swift](/docs/reference/swift/firebaseperformance/api/reference/Protocols/PerformanceAttributable#setvalue_:forattribute:) \\|\n[Obj-C](/docs/reference/ios/firebaseperformance/api/reference/Protocols/FIRPerformanceAttributable#-setvalue:forattribute:))\nbut not custom metrics.\n\nNext steps\n\n- [Set up alerts](/docs/perf-mon/alerts) for network requests that are degrading the performance of your app. For example, you can configure an email alert for your team if the *response time* for a specific URL pattern exceeds a threshold that you set."]]