js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptのmatchメソッドでマッチした文字列を取得する際のエラー回避 |
https://qiita.com/tomochan/items/d5defdf7fcd12e435559
|
array |
2022-04-16 14:33:48 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
【Rails】Gem::Ext::BuildError: ERROR: Failed to build gem native extension. |
https://qiita.com/jibiking/items/d543f18b7871fffb54e9
|
buildgemnativeextension |
2022-04-16 14:58:15 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【Rails】Gem::Ext::BuildError: ERROR: Failed to build gem native extension. |
https://qiita.com/jibiking/items/d543f18b7871fffb54e9
|
buildgemnativeextension |
2022-04-16 14:58:15 |
海外TECH |
DEV Community |
Monitor gRPC calls with OpenTelemetry - explained with a Golang example |
https://dev.to/signoz/monitor-grpc-calls-with-opentelemetry-explained-with-a-golang-example-350o
|
Monitor gRPC calls with OpenTelemetry explained with a Golang examplegRPC Google Remote Procedure Call is a high performance open source universal RPC framework that Google developed to achieve high speed communication between microservices gRPC has Protobuf protocol buffers by default which would format or serialize the messages to a specific format that will be highly packed highly efficient data By its virtue of being a lightweight RPC gRPC is suited for many use cases gRPC can be considered a successor to RPC which is light in weight Google developed it to communicate between microservices and other systems that need to interact There are several benefits of using gRPC Uses Protocol Buffers Protobuf instead of JSONBuilt on HTTP instead of HTTP Built in code generationHigh performanceSSL securityApart from the above mentioned key benefits gRPC also promotes better design in your application gRPC is API oriented instead of resource oriented like REST It is also asynchronous by default which means it does not block the thread on request and it can serve millions of requests in parallel ensuring high scalability Advantages of gRPC over RESTgRPC is roughly seven times faster than REST when receiving data amp roughly times faster than REST when sending data for a specific payload This is mainly due to the tight packing of the Protocol Buffers and the use of HTTP by gRPC What is OpenTelemetry OpenTelemetry is a vendor agnostic set of tools APIs and SDKs used to create and manage telemetry data Logs metrics and traces It aims to make telemetry data logs metrics and traces a built in feature of cloud native software applications The telemetry data generated helps to monitor application performance What is OpenTelemetry instrumentation Instrumentation is the process by which you enable application code to generate telemetry data OpenTelemetry provides instrumentation for various libraries and frameworks in different languages For example in this article we will use OpenTelemetry gRPC libraries in Golang to generate telemetry data from gRPC calls We will be using OpenTelemetry libraries to monitor gRPC calls in our sample Golang application OpenTelemetry can only help in generating the telemetry data In order to store and analyze that data you need to choose a backend analysis tool In this article we will monitor collected data from gRPC calls with SigNoz SigNoz is a full stack open source APM tool that provides metrics monitoring and distributed tracing It is built to natively support OpenTelemetry data formats Hence it s a great choice for a backend analysis tool to combine with OpenTelemetry On a side note OpenTelemetry provides you the freedom to select a backend analysis tool of your choice Installing SigNozSigNoz can be installed on macOS or Linux computers in just three steps by using a simple install script The install script automatically installs Docker Engine on Linux However on macOS you must manually install Docker Engine before running the install script git clone b main https github com SigNoz signoz gitcd signoz deploy install shYou can visit our documentation for instructions on how to install SigNoz using Docker Swarm and Helm Charts When you are done installing SigNoz you can access the UI at http localhost SigNoz dashboard It shows services from a sample app that comes bundled with the application Running a Sample Golang gRPC Application with OpenTelemetryWe will use a sample Golang gRPC application consisting of components such as Go gRPC server go gRPC Client along with MongoDB Sample Golang gRPC GitHub repoOur application is a simple Employee Service Here is the architecture of the application along with OpenTelemetry and Signoz Application architecture along with SigNoz and OpenTelemetry OTel Collector PrerequisitesGolang any one of the three latest major releases of Go For installation instructions see Go s Getting Started guide Protocol buffer compiler protoc version For installation instructions see Protocol Buffer Compiler Installation Go plugins for the protocol compiler Install the protocol compiler plugins for Go using the following commands go install google golang org protobuf cmd protoc gen go v go install google golang org grpc cmd protoc gen go grpc vUpdate your PATH so that the protoc compiler can find the plugins export PATH PATH go env GOPATH bin MongoDBFollow the steps in this link for how to install MongoDB Running a sample application with OpenTelemetryFollowing are the steps to run the sample Golang gRPC application with OpenTelemetry Step Clone the sample Golang app repository and go to the root folderWe will be using a sample go grpc app in this GitHub repo git clone https github com SigNoz distributed tracing go grpc sample gitcd distributed tracing go grpc sampleStep Install the required dependenciesYou can check out the dependencies required from go mod file Install all the required dependencies for the sample application usinggo mod tidygo mod vendorOpenTelemetry needs the following libraries to instrument the golang grpc app OpenTelemetry libraries required for monitoring gRPCStep Creation of proto filesIn the proto file we have the service definition and the respective functions messages and through the protoc compiler we will generate the necessary protobuf files The following two commands will install the dependencies for golang s grpc and protoc gen go which will need the proto file Now let s see how the protoc compiler generates the respective code for Golang For this we have executed the following command from the root of our project protoc go out go opt paths source relative go grpc out go grpc opt paths source relative employee employee protoNotice that we use relative paths and set the path of our employee proto file to compile The above command has generated two files employee pb goFor serializing the messages using protobuf and the other fileemployee grpc pb goConsisting of code for the gRPC client and server code that we will be looking at later on If you look at the file employee grpc pb go you can notice that structs and interfaces are generated for the client and server implementation You can check for the proto files here Step Tracer Config for the gRPC Server gRPC Client and MongoDBIn order to instrument our services we will create a config go file and use it to instrument the gRPC Server gRPC Client and MongoDB We need to initialize OpenTelemetry as the first call inside the main function in both gRPC server and client If your application starts before OpenTelemetry is set up it can create issues You can initialize OpenTelemetry by using the code as shown below func main tp config Init defer func if err tp Shutdown context Background err nil log Printf Error shutting down tracer provider v err You can check out the configuration in the code sample here Step Instrumenting MongoDBBut when it comes to instrumentation data for MongoDB we need to use this OpenTelemetry Go library It is already included in the go mod file of the sample repo When the MongoDB client is initialized we need to set the monitor through otelmongo NewMonitor method like below which would get the instrumentation data from MongoDB client err mongo NewClient options Client ApplyURI mongo url SetMonitor otelmongo NewMonitor if err nil log Fatal err Step Setting up env filesWe have the env files in the client and server directory in order to set up environment variables required for grpc server and grpc client components This is how the server env looks likeMONGO URL mongodb localhost employeedbOTEL EXPORTER OTLP ENDPOINT localhost OTEL SERVICE NAME go grpc otel server INSECURE MODE trueThis is how the client env looks likeOTEL EXPORTER OTLP ENDPOINT localhost OTEL SERVICE NAME go grpc otel client INSECURE MODE trueYou can check the client env file and server env file in the sample GitHub repo env files loading in both server server go and client client goStep Create MongoDB Table and Collection in Mongo CompassClick on Connect →New ConnectionClick on Databases tab →Create Database and fill in the fields like the below screenshotNow that the sample Golang gRPC application is set up with OpenTelemetry let s see how we can use SigNoz dashboard to monitor the collected data Monitoring Golang gRPC and MongoDB with SigNoz dashboardsYou need to generate some data to see how traces are captured in the SigNoz dashboard From the root of our project Step cd to the server directory and then run the go grpc servergo run server goStep cd to the client directory and then run the go grpc clientgo run client goRunning the client makes a set of CRUD operations in MongoDB such as create Employee Read Employee Update Employee and Delete Employee We have added traces for all these operations so that it generates some monitoring data to be explored on the SigNoz dashboard Now open the SigNoz dashboard in your browser at http localhost dashboard You should now be able to notice Go Grpc Otel Server in the list of services being monitored on the dashboard Our Service Go gRPC Otel Server being monitored by SigNozMonitor list of top endpointsOur example telemetry configuration assumes that our application is running locally and that we want to process every span individually as it s emitted List of top endpoints of Go gRPC Otel Server service shown by SigNozExplore all events spans in your serviceYou can get a list of all the events or spans as defined in distributed tracing related to your Go gRPC Otel Server Use powerful filters on the Traces tab of SigNoz dashboard to analyze your Application performance SigNoz captures all events related to our application You can use powerful filters to analyze and debug performance issues quickly Detailed trace of each span in ApplicationClicking on any span in the span table will bring you to a detailed trace page where the entire journey of traces of server client and MongoDB are shown The trace detail page has the info on time taken by each part of the request can help identify latency issues quickly You will see the flamegraph of the selected event which shows how the request traveled between the gRPC server and the gRPC client Flamegraphs in SigNoz dashboardSigNoz also provides a detailed view of common semantic conventions like rpc service method net status code etc The end to end tracing of user requests can help you to identify latency issues quickly MongoDB Traces and its semantic conventionsEstablishing a sequential flow of the query and info on the time taken by each part of the request can help quickly identify latency issues For example you can see details like how much time the find query took You can also see the related MongoDB query It also provides the semantic conventions of MongoDB in the below window SigNoz also provides more contextual data about MongoDB requestsTroubleshooting an errorYou can also use SigNoz dashboard to capture error in your MongoDB queries If you request for a data field that is not available in the backend then the application will return an error Troubleshooting an error ConclusionOpenTelemetry makes it very convenient to instrument gRPC calls for performance monitoring OpenTelemetry is going to be the future of monitoring and observability for cloud native applications as it s backed by a huge community The biggest advantage of using OpenTelemetry is that you are not locked in to a vendor If tomorrow you want to use a different vendor you can do so easily SigNoz works natively with OpenTelemetry The query service and the visualization layer on top of your telemetry data is key to generate actionable insights quickly SigNoz provides out of box charts and powerful filters to analyze the telemetry data quickly OpenTelemetry and SigNoz provide a great open source solution to monitor gRPC calls You can try out SigNoz by visiting its GitHub repo If you have any questions or need any help in setting things up join our slack community and ping us in support channel Read more about OpenTelemetry from SigNoz blogMonitoring GraphQL APIs with OpenTelemetryMonitor a Go application with OpenTelemetry |
2022-04-16 05:46:55 |
海外TECH |
DEV Community |
How to Forward a domain to another domain |
https://dev.to/segun_aderinola/how-to-forward-a-domain-to-another-domain-4i5n
|
How to Forward a domain to another domainDo you have a new domain name for your website and you are thinking of how to link the old and the new domain together such that if people visit the old domain it will forward or redirect the user to the new domain name In this article we will be learning domain forwarding how we can handle domain forwarding and the reason why it is necessary What is Domain forwarding Sometimes a website is so good you have to name it twice three times or more Included in the cost of the domain name domain forwarding allows you to point one or more domain names to an existing website You may be wondering why or how you would use additional domain names to drive traffic to your primary website Misspellings alternate extensions abbreviations or keywords are all popular examples of different domain names pointing to the same website For example If your domain is registered with GoDaddy one of the most popular web hosting companies where you can host your websites and your website is hosted by another web hosting company you can forward your GoDaddy domain to a site you ve created with Wix WordPress or any other URL Reasons why you need domain forwardingMisspelling How many times have you accidentally typed facebok com into your web browser Think about how much traffic a domain name like that gets from people mistakenly entering the wrong address Facebook combats this by redirecting facebok com fasebook com and many other misspellings to their main website facebook com If they hadn t their users could end up on someone else s website a competitor perhaps Web forwarding creates a seamless experience for users who might not have even realized their mistake Abbreviations Businesses universities and other such cases can use abbreviations as their main domain name or as their redirect Kelly Blue Book uses web forwarding for this purpose When you type kellybluebook com into your web browser you will be redirected to their main website address kbb com Keywords or Phrases We don t always get our first choice when it comes to usernames for our social media profiles or domain endings If you didn t get your name in com you can always find a short and keyword specific new domain ending to redirect to With the introduction of hundreds of new generic domains web forwarding also known as “Domain forwarding or “URL forwarding is a great tool to have Why do we use hosting To build a website you will need both a domain name and a web hosting account You need web hosting to store your website s files After you get hosting you need to update your domain name settings and point it to your web hosting service provider You can also buy both the domain and hosting from the same company Why webpage redirection is useful for website development A website redirect points your old URL to a new page When anyone types in or click on that original URL they ll be taken to the page you set the redirect up to instead It ensures visitors don t end up on a page and instead find something relevant to what they were originally looking for Different types of Domain forwardingThere are two main types of domain forwarding Forward Only or HTTP ForwardingForwarding as redirect forwards your domain name to another URL while changing the name to the forwarded to site s address in the browser location bar This is the most popular option of web forwarding Redirects visitors to a destination URL of your choosingKeeps the destination URL in the browser address barFor example you have a domain name called www old com and you forward the domain to another domain say www new com If the user visits www old com the user will be redirected to www new com but www old com will be displayed in the URL bar Forward with Masking Cloaking Forwarding Forwarding with masking forwards your domain name to another URL while keeping the original name in the browser location bar This prevents visitors from seeing your forwarded to domain name Redirects visitors to a destination URL of your choosingKeeps your domain name in the browser address barAllows you to enter meta tags for search engine informationFor example you have a domain name called www this com and you forward the domain to another domain say www new com If the user visits www old com the user will be redirected to www new com and www new com will be displayed in the URL bar How do I redirect a domain to another Redirecting a new domain or subdomain legacy log in to your domain hosting account Navigate to the Manage Domains page The Manage Domains page opens Click the Add Hosting to a Domain Sub Domain button Scroll down to the Redirect section Enter the information in the following fields Click the Redirect this domain button to complete the setup I hope you found this article helpful Thanks for reading ️ Happy coding |
2022-04-16 05:34:14 |
海外TECH |
DEV Community |
Renew Detox - Simple Weight Loss Finally Feel In Control Around Food! |
https://dev.to/renewdetoxbuy/renew-detox-simple-weight-loss-finally-feel-in-control-around-food-2bjh
|
Renew Detox Simple Weight Loss Finally Feel In Control Around Food It should show you the notable features of a revolution That reason is an elementary way to find just the right Renew Detox So far in that project I have not seen any that vapid expression but we require a simple plan I may have to presume you are here because you want a transparent primer on it I reckon you ll like these keen insights It is a typo They said it is an one time thing I m broke This is a tremendous mistake This is a crisis situation Indubitably do persons use that program It has matchless power I just want it to be trouble free I might do less of the hype It s simple for me to say that This is unmistakable and few of my hordes up to now know this Aren t you looking for that right now It doesn t actually require much expensive equipment It is best done with it This was really cheap It gives me peace of mind Order Now gt Click Here gt |
2022-04-16 05:10:05 |
海外TECH |
DEV Community |
Top Benefits of tomato for skin complexion |
https://dev.to/justinder/top-benefits-of-tomato-for-skin-complexion-4de7
|
Top Benefits of tomato for skin complexionSo today we dicuss about some Benefits of tomato for skin Tomato is a rich source of antioxidants and Vitamin C along with high contents of really healthy nutrients such as potassium magnesium lycopene and Vitamin A etc Tomatoes are really healthy for our body they can boost and strengthen our immune system But do you think tomatoes are equally healthy if we apply them on our skin Well the answer is yes tomatoes are storehouse of antioxidants and rich in vitamin A and C hence it is really effective for skin There is a very long list of benefits of tomato for skin as it can work wonders in treating dull damaged and tanned skin It can treat skin problems occurred due to sun damage and works magically in correcting ageing related skin issues Here are some of the amazing benefits of tomato for skin complexion source |
2022-04-16 05:04:23 |
金融 |
ニュース - 保険市場TIMES |
なないろ生命、「なないろがん治療保険極」「なないろメディカル礎」を発売 |
https://www.hokende.com/news/blog/entry/2022/04/16/150000
|
なないろ生命、「なないろがん治療保険極」「なないろメディカル礎」を発売「なないろがん治療保険」と「なないろメディカル」を改定なないろ生命は月日、がん治療サポート保険「なないろがん治療保険極きわみ」と、医療保険「なないろメディカル礎いしずえ」を月日より発売すると発表した。 |
2022-04-16 15:00:00 |
海外ニュース |
Japan Times latest articles |
Why Ukraine war crimes trials could take many years |
https://www.japantimes.co.jp/news/2022/04/16/world/ukraine-russia-war-crimes-trials/
|
Why Ukraine war crimes trials could take many yearsLong after the fighting ends any prosecutions and trials arising from it could be barely beginning Here is a look at the complexities of bringing |
2022-04-16 14:06:43 |
ニュース |
BBC News - Home |
UK Rwanda asylum plan against international law, says UN refugee agency |
https://www.bbc.co.uk/news/uk-61122241?at_medium=RSS&at_campaign=KARANGA
|
overseas |
2022-04-16 05:36:32 |
ニュース |
BBC News - Home |
Conor Benn v Chris van Heerden: British welterweight targets world title tilt |
https://www.bbc.co.uk/sport/boxing/61052256?at_medium=RSS&at_campaign=KARANGA
|
Conor Benn v Chris van Heerden British welterweight targets world title tiltConor Benn opens up on the pressure of protecting his undefeated record ahead of his fight with Chris van Heerden on Saturday in Manchester |
2022-04-16 05:40:47 |
北海道 |
北海道新聞 |
世界バレー、ウクライナが出場 ロシア除外で代わりに |
https://www.hokkaido-np.co.jp/article/670347/
|
世界バレー |
2022-04-16 14:35:00 |
北海道 |
北海道新聞 |
山では複数人で行動を 厚岸でヒグマに襲われた男性語る 山菜シーズン、専門家が警戒呼び掛け |
https://www.hokkaido-np.co.jp/article/670144/
|
釧本 |
2022-04-16 14:34:46 |
北海道 |
北海道新聞 |
栗山高の女子硬式野球チーム始動 道内公立高で初、新入生2人「練習ワクワク」 |
https://www.hokkaido-np.co.jp/article/670150/
|
硬式野球 |
2022-04-16 14:26:42 |
コメント
コメントを投稿