amccool / am.elasticsearch.tracelistener Goto Github PK
View Code? Open in Web Editor NEWA TraceListener posting to ElasticSearch
License: MIT License
A TraceListener posting to ElasticSearch
License: MIT License
DotTrace profiler shows calls to Environment.UserDomainName and Environment.UserName are slow. Refactor the code to grab the UserDomainName and UserName once in the constructor for the listener.
ElasticSearch.Diagnostics doesn't work with Elasticsearch.Net > 2.5.5
using TraceData on some EntityFramework exceptions cause the ES TraceListener serializer to throw.
The original exception was a DbEntityValidationException, which caused the TraceData to throw a JsonSerializationException due to a "Self referencing loop".
Another Entity Framework Error was: "OriginalValues cannot be used for entities in the Added state" appeared to be trying to serialize properties of the EF entities which seem to be throwing during the property's "get".
Under both cases our ILogger was catching the exception thrown by Elasticsearch.TraceListener but the messages were not very useful.
I will have a pull request ready in just a minute
How can I pass authorization headers to kibana?
Include the username, this is the username of user executing the process.
if ElasticSearchTraceIndex is missing
or
ElasticsearchUri is missing the TraceListener will crash the entire application
change to provide defaults.
the timestamp field in the TraceEventCache is actually the Ticks passed by the Diagnostics
https://msdn.microsoft.com/en-us/library/system.diagnostics.traceeventcache.timestamp(v=vs.110).aspx
change the field name to Tick to allow Elasticsearch to use it OWE timestamp
We are using this in an IIS Web App and a Windows Service. The AppDomainFriendlyName for the Windows Service looks great, but the one for the Web App looks like:
/LM/W3SVC/1039/ROOT-1-131631189689932306
It would be nice if the AppDomainFriendlyName was the name of the web app, or if I could override it with my own custom (useful) text.
There is a line in InternalWrite that calls Environment.StackTrace.
This is no longer used and may cause a performance hit. It should be removed.
[Field name [{http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord}TraceRecord] cannot contain '.']
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: [2017-01-24 12:02:02,278][DEBUG][action.admin.indices.mapping.put] [Ningal] failed to put mappings on indices [[trace-2017-01-24-18]], type [Trace] Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: MapperParsingException[Field name [{http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord}TraceRecord] cannot contain '.'] Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:277)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:222)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parse(ObjectMapper.java:197)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:309)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:222)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.object.RootObjectMapper$TypeParser.parse(RootObjectMapper.java:139)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:118)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:99)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:549)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.applyRequest(MetaDataMappingService.java:257)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.cluster.metadata.MetaDataMappingService$PutMappingExecutor.execute(MetaDataMappingService.java:230)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.cluster.service.InternalClusterService.runTasksForExecutor(InternalClusterService.java:468)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:772)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:231)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:194)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
Jan 24 12:02:02 SmellyCat01 elasticsearch[576]: at java.lang.Thread.run(Thread.java:745)
move from raw elasticsearchclient to NEST
move into Rx.net stable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.