servicefabric | Unofficial Service Fabric Golang API | REST library
kandi X-RAY | servicefabric Summary
kandi X-RAY | servicefabric Summary
Unofficial Service Fabric Golang API
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- GetProperties returns the properties of a named property
- NewClient returns a new Client .
- withContinue is a helper function that adds a token to the query params .
- getString converts string to string
- withParam adds a parameter to the query params .
- noOp is used to remove params from params
servicefabric Key Features
servicefabric Examples and Code Snippets
Community Discussions
Trending Discussions on servicefabric
QUESTION
I'm trying to create new Azure Monitor Alert using PS script. I'm using MS documentation here: https://docs.microsoft.com/en-us/powershell/module/az.monitor/add-azmetricalertrulev2?view=azps-5.9.0
Steps to reproduce$condition = New-AzMetricAlertRuleV2Criteria -MetricName "SqlDbDtuUsageMetric" -MetricNameSpace "Microsoft.Sql/servers/databases" -TimeAggregation Average -Operator GreaterThan -Threshold 5
$act = New-AzActionGroup -ActionGroupId /subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/microsoft.insights/actionGroups/SqlDbDtuUsageAction
Add-AzMetricAlertRuleV2 -Name "SqlDbDtuUsageAlertGt5" -ResourceGroupName {resource_group} -WindowSize 00:05:00 -Frequency 00:05:00 -TargetResourceId "/subscriptions/{subscription_id}/resourceGroups/{resource_group}/providers/Microsoft.Sql/servers/{sql_server}/databases/vi{sql_db}" -Description "Alerting when max used DTU is > 20" -Severity 3 -ActionGroup $act -Condition $condition
Error outputWARNING: 09:04:18 - *** The namespace for all the model classes will change from Microsoft.Azure.Management.Monitor.Management.Models to Microsoft.Azure.Management.Monitor.Models in future releases. WARNING: 09:04:18 - *** The namespace for output classes will be uniform for all classes in future releases to make it independent of modifications in the model classes. VERBOSE: Performing the operation "Create/update an alert rule" on target "Create/update an alert rule: SqlDbDtuUsageAlertGt5 from resource group: vi-prod-be-cin-rg". Add-AzMetricAlertRuleV2 : Exception type: ErrorResponseException, Message: Couldn't find a metric named metric1. Make sure the name is correct. Activity ID: 3e7e537e-43fc-40ad-8a84-745df33e1668., Code: BadRequest, Status code:BadRequest, Reason phrase: BadRequest At line:1 char:1
- Add-AzMetricAlertRuleV2 -Name "SqlDbDtuUsageAlertGt5" -ResourceGroupN ...
- ...
ANSWER
Answered 2021-May-25 at 01:40According to the error, the MetricNameSpace Microsoft.Sql/servers/databases
does not contain metric SqlDbDtuUsageMetric
. Regarding the supported metric, please use the following command to get
QUESTION
i am attempting to create a service fabric cluster via terraform, I wish to add either 1 or 2 node type parameters dynamically.
My cluster is defined as so:
...ANSWER
Answered 2021-Apr-30 at 06:55You can use dynamic blocks. Basically, first
is always created, while second
is optional:
QUESTION
I have around 10 microservice applications in .net, all hosted on Azure ServiceFabric. These applications are setup in a sequence for example
...ANSWER
Answered 2021-Apr-22 at 05:43There are two options to do it with Application Insights. Both are not ideal at this point.
Option I. If you store all telemetry in the same resource and your app doesn't have too much load then you can group by (summarize) by CorrelationId. Here is an idea (you might want to extend it by recording start time when it comes to Application 1 and end time when it comes to Application 3):
QUESTION
All,
I have some problem setting up end-2-end transaction monitoring in ApplicationInsights, it seems to break the end-2-end view on my ServiceFabric ApiGateway service (.net CORE). This results in 2 traces in AppInsights instead of 1 (which I want ;-).
Ok my setup:
So an external API (.net core) which communicates to a ApiGateway (.net core stateless service) in a SF cluster via HTTP. Within the SF cluster all service (stateless full .net) communication is via Remoting V2.
I setup ApplicationInsights using ex. : https://github.com/yantang-msft/service-fabric-application-insights-example
In ApplicationInsights I see 2 traces (which should be one), being:
- a trace containing External API & ApiGateWay and the request to the stateless service
- a trace containing communication between the stateless services (which are multiple)
It looks like the "Operation Id" is not reused when sending the message from the APIGateway down. Is AppInsights i can see the "Operation Id" differ.
Does anyone have a idea? An I missing something? Should I set the operation id on the outgoing request in the ApiGateway (and how can I do that ;-))
...ANSWER
Answered 2021-Feb-05 at 09:17After some contact (https://github.com/microsoft/ApplicationInsights-ServiceFabric/issues/115) the issue became clear.
It's because of the new version of AppInsight is using a new protocol, which is in the .net version of the library. You can force AppInsights to use the "old" protocol and then the end to end trace works again. You can to this by setting the ActivityIDformat property to legacy one like below. (somewhere in app startup)
QUESTION
While trying to connect to SQLAnywhere (Sybase) database (C# code) from Azure ServiceFabric:
...ANSWER
Answered 2021-Jan-25 at 12:12It was another traffic protection tool. Although it was possible to telnet the port, still traffic from app was blocked by another tool.
QUESTION
This is a followup question to Specific questions about unit-testing Service Fabric Applications using Mocks
I am using Xunit along with ServiceFabric.Mocks to Unit Test my application. My Service Fabric application looks like this:
...ANSWER
Answered 2020-Dec-21 at 07:50You're on the right track!
- Step 1.
The classes ConfigurationSection
and ConfigurationProperty
are in SF namespace System.Fabric.Description
. Add a using
for the namespace
- Step 2.
Please upgrade to ServiceFabric.Mocks v4.2.8. This adds support to mock the DataPackage
property on MockCodePackageActivationContext
.
See this page for an example.
- Step 3.
Use the created context as a constructor argument. Change this code:
QUESTION
I am writing unit tests for a Service Fabric Application class. I am running into some errors which I don't understand how to fix. The class definition is of the sort:
...ANSWER
Answered 2020-Dec-16 at 11:46Yes, you can use the ServiceFabric.Mocks library, to create a test instance of your service by using the following code:
QUESTION
When trying to debug Service Fabric locally it fails during deployment:
...ANSWER
Answered 2020-Sep-30 at 08:18I had this same issue for the past day or so, and I was able to resolve the issue by searching my OS(C://) drive for the first part of the key name {first part}_{the rest}.
I found a copy/original key in "C:\Users\youruser\AppData\Roaming\Microsoft\Crypto\Keys" and copied it over to "C:\ProgramData\Microsoft\Crypto\Keys".
After doing this the app was able to run and deploy again on my local machine.
QUESTION
I have an app that seems to accumulate a lot of memory. One of the suspects is below, and I'm just trying to wrap my head around what it is actually doing. Or, more specifically, how is it cleaned up?
...ANSWER
Answered 2020-Nov-20 at 12:03The Garbage Collector is a strange beast, so it's worth getting to know about its behaviour. (Note, this is a simplistic view of the GC)
First of all, if just one reference exists to an object, that object is not considered garbage, so it will never be collected. As your Dictionary is static, it is always going to exist, so anything contained within it will always have a reference to it. If there are no other references to the contained object and you remove it from the Dictionary, it will become unreachable and therefore garbage and will be collected. Making sure there are no references to your objects is the way to ensure they will be collected. It's very easy to forget about some reference you made somewhere, which keeps the object alive.
Secondly, the Garbage Collector doesn't run continuously. It runs when memory resources are getting low and needs to release some memory. This is so that it doesn't hog the CPU to the detriment of the main applications. This means that objects can still be in memory for some time before the next Garbage Collection. This can make memory usage seem high at times, even when it isn't.
Thirdly, the Garbage Collector has "Generations". Generation 0 objects are the newest and most short-lived objects. Generation 0 objects are collected most often, but only when memory is needed.
Generation 1 contains short-lived objects that are on their way to becoming long-lived objects. They are collected less often that Generation 0 objects. In fact, Generation 1 collection only happens if a Generation 0 collection did not release enough memory.
Generation 2 objects are long-lived. These are typically things like static objects which exist for the lifetime of the application. Similarly, these are collected when the Generation 1 collection doesn't release enough memory.
Finally, there is the Large Object heap. Objects that consume a lot of memory take time to move around (part of the garbage collection process involves defragmenting the memory after collection has taken place), so they tend to remain uncollected unless collection didn't release enough memory. Some people refer to this as Generation 3, but they are actually collected in Generation 2 when necessary.
QUESTION
We have an application that has been running on Service Fabric for a while using remoting with stateless services. After upgrading to Remoting v2, some methods are failing with the following error:
...ANSWER
Answered 2020-Nov-03 at 05:57Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install servicefabric
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page